polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [78/80] zest-java git commit: Tightening everything up after massive namespace change. Removal of practically all "Qi4j" names and references.
Date Thu, 30 Jul 2015 19:49:17 GMT
http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHealthCheckFactory.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHealthCheckFactory.java b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHealthCheckFactory.java
index efb2d03..25cdbcc 100644
--- a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHealthCheckFactory.java
+++ b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHealthCheckFactory.java
@@ -29,7 +29,7 @@ public interface MetricsHealthCheckFactory extends MetricsFactory
      * @param name   A human readable, short name of the metric.
      * @param check  The health check to be performed regularly.
      *
-     * @return A MetricsHealthCheck instance to be used, OR org.qi4j.spi.metrics.DefaultMetric.NULL if not supported.
+     * @return A MetricsHealthCheck instance to be used, OR org.apache.zest.spi.metrics.DefaultMetric.NULL if not supported.
      *
      */
     MetricsHealthCheck registerHealthCheck( Class<?> origin, String name, MetricsHealthCheck check );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHistogramFactory.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHistogramFactory.java b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHistogramFactory.java
index 78cbbea..2e01835 100644
--- a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHistogramFactory.java
+++ b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsHistogramFactory.java
@@ -28,7 +28,7 @@ public interface MetricsHistogramFactory extends MetricsFactory
      * @param origin The class that instantiate the metric
      * @param name   A human readable, short name of the metric.
      *
-     * @return A Metric instance to be used, OR org.qi4j.spi.metrics.DefaultMetric.NULL if not supported.
+     * @return A Metric instance to be used, OR org.apache.zest.spi.metrics.DefaultMetric.NULL if not supported.
      *
      */
     MetricsHistogram createHistogram( Class<?> origin, String name );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/main/java/org/apache/zest/api/metrics/MetricsMeterFactory.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsMeterFactory.java b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsMeterFactory.java
index 6deb83c..aadc475 100644
--- a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsMeterFactory.java
+++ b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsMeterFactory.java
@@ -32,7 +32,7 @@ public interface MetricsMeterFactory extends MetricsFactory
      * @param eventType the plural name of the event the meter is measuring (e.g., {@code "requests"})
      * @param rate      the scale unit for this timer's rate metrics
      *
-     * @return A Metric instance to be used, OR org.qi4j.spi.metrics.DefaultMetric.NULL if not supported.
+     * @return A Metric instance to be used, OR org.apache.zest.spi.metrics.DefaultMetric.NULL if not supported.
      */
     MetricsMeter createMeter( Class<?> origin, String name, String eventType, TimeUnit rate );
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/main/java/org/apache/zest/api/metrics/MetricsTimerFactory.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsTimerFactory.java b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsTimerFactory.java
index 74a7b7f..585c678 100644
--- a/core/api/src/main/java/org/apache/zest/api/metrics/MetricsTimerFactory.java
+++ b/core/api/src/main/java/org/apache/zest/api/metrics/MetricsTimerFactory.java
@@ -32,7 +32,7 @@ public interface MetricsTimerFactory extends MetricsFactory
      * @param duration the scale unit for this timer's duration metrics
      * @param rate     the scale unit for this timer's rate metrics
      *
-     * @return A Metric instance to be used, OR org.qi4j.spi.metrics.DefaultMetric.NULL if not supported.
+     * @return A Metric instance to be used, OR org.apache.zest.spi.metrics.DefaultMetric.NULL if not supported.
      *
      */
     MetricsTimer createTimer( Class<?> origin, String name, TimeUnit duration, TimeUnit rate );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/main/java/org/apache/zest/api/property/Numbers.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/property/Numbers.java b/core/api/src/main/java/org/apache/zest/api/property/Numbers.java
index 2fd39bf..9371c61 100644
--- a/core/api/src/main/java/org/apache/zest/api/property/Numbers.java
+++ b/core/api/src/main/java/org/apache/zest/api/property/Numbers.java
@@ -18,7 +18,7 @@ import java.math.BigDecimal;
 
 /**
  * Convenience class for mathematical operations on numerical properties.
- * <pre>import static org.qi4j.api.property.Numbers.*;
+ * <pre>import static org.apache.zest.api.property.Numbers.*;
  * ...
  * add( object.numberProperty(), 5 );</pre>
  */

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/main/java/org/apache/zest/api/service/qualifier/package.html
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/service/qualifier/package.html b/core/api/src/main/java/org/apache/zest/api/service/qualifier/package.html
index ec0edd3..82127ed 100644
--- a/core/api/src/main/java/org/apache/zest/api/service/qualifier/package.html
+++ b/core/api/src/main/java/org/apache/zest/api/service/qualifier/package.html
@@ -43,16 +43,16 @@ limitations under the License.
         </blockquote>
         <p>
             Let's say these SomeImportedService are only sometimes available. Then whenever iterator() is called the
-            {@link org.qi4j.api.service.qualifier.Active} tag can kick in and filter out those whose
+            {@link org.apache.zest.api.service.qualifier.Active} tag can kick in and filter out those whose
             ServiceReference.isActive() returns false.
         </p>
         <p>Standard ones defined in the API are:</p>
         <ul>
-            <li>{@link org.qi4j.api.service.qualifier.Active}</li>
-            <li>{@link org.qi4j.api.service.qualifier.Available}</li>
-            <li>{@link org.qi4j.api.service.qualifier.HasMetaInfo}</li>
-            <li>{@link org.qi4j.api.service.qualifier.IdentifiedBy}</li>
-            <li>{@link org.qi4j.api.service.qualifier.Tagged}</li>
+            <li>{@link org.apache.zest.api.service.qualifier.Active}</li>
+            <li>{@link org.apache.zest.api.service.qualifier.Available}</li>
+            <li>{@link org.apache.zest.api.service.qualifier.HasMetaInfo}</li>
+            <li>{@link org.apache.zest.api.service.qualifier.IdentifiedBy}</li>
+            <li>{@link org.apache.zest.api.service.qualifier.Tagged}</li>
         </ul>
         <p>See tests and API for more examples, and how to implement your own qualifiers.</p>
     </body>

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/main/java/org/apache/zest/api/structure/ApplicationDescriptor.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/structure/ApplicationDescriptor.java b/core/api/src/main/java/org/apache/zest/api/structure/ApplicationDescriptor.java
index 9d89ebd..889042d 100644
--- a/core/api/src/main/java/org/apache/zest/api/structure/ApplicationDescriptor.java
+++ b/core/api/src/main/java/org/apache/zest/api/structure/ApplicationDescriptor.java
@@ -13,7 +13,7 @@
  */
 package org.apache.zest.api.structure;
 
-import org.apache.zest.api.Qi4j;
+import org.apache.zest.api.ZestAPI;
 import org.apache.zest.functional.VisitableHierarchy;
 
 /**
@@ -28,7 +28,7 @@ public interface ApplicationDescriptor
      * @param importedServiceInstances Imported Services instances
      * @return a new instance of the Application.
      */
-    Application newInstance( Qi4j runtime, Object... importedServiceInstances );
+    Application newInstance( ZestAPI runtime, Object... importedServiceInstances );
 
     /**
      * @return the Application's name

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/main/java/org/apache/zest/api/util/Classes.java
----------------------------------------------------------------------
diff --git a/core/api/src/main/java/org/apache/zest/api/util/Classes.java b/core/api/src/main/java/org/apache/zest/api/util/Classes.java
index 79f1d32..5a29f7d 100644
--- a/core/api/src/main/java/org/apache/zest/api/util/Classes.java
+++ b/core/api/src/main/java/org/apache/zest/api/util/Classes.java
@@ -552,7 +552,7 @@ public final class Classes
      * Example:
      * </p>
      * <p>
-     * Class name com.example.Foo$Bar is converted to URI urn:qi4j:com.example.Foo-Bar
+     * Class name com.example.Foo$Bar is converted to URI urn:zest:com.example.Foo-Bar
      * </p>
      *
      * @param className class name
@@ -565,7 +565,7 @@ public final class Classes
         throws NullPointerException
     {
         className = normalizeClassToURI( className );
-        return "urn:qi4j:type:" + className;
+        return "urn:zest:type:" + className;
     }
 
     /**
@@ -580,7 +580,7 @@ public final class Classes
     public static String toClassName( String uri )
         throws NullPointerException
     {
-        uri = uri.substring( "urn:qi4j:type:".length() );
+        uri = uri.substring( "urn:zest:type:".length() );
         uri = denormalizeURIToClass( uri );
         return uri;
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/configuration/ConfigurationTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/configuration/ConfigurationTest.java b/core/api/src/test/java/org/apache/zest/api/configuration/ConfigurationTest.java
index 8d67f6c..71cbb0f 100644
--- a/core/api/src/test/java/org/apache/zest/api/configuration/ConfigurationTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/configuration/ConfigurationTest.java
@@ -26,13 +26,13 @@ import org.apache.zest.api.service.ServiceComposite;
 import org.apache.zest.api.value.ValueComposite;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.test.EntityTestAssembler;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.junit.Assert.assertThat;
 
-public class ConfigurationTest extends AbstractQi4jTest
+public class ConfigurationTest extends AbstractZestTest
 {
 
     @Override

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/configuration/DeclareConfigurationDefaultsTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/configuration/DeclareConfigurationDefaultsTest.java b/core/api/src/test/java/org/apache/zest/api/configuration/DeclareConfigurationDefaultsTest.java
index dbc8b18..bbf81e2 100644
--- a/core/api/src/test/java/org/apache/zest/api/configuration/DeclareConfigurationDefaultsTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/configuration/DeclareConfigurationDefaultsTest.java
@@ -25,11 +25,11 @@ import org.apache.zest.api.property.Property;
 import org.apache.zest.api.service.ServiceComposite;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.test.EntityTestAssembler;
 
 public class DeclareConfigurationDefaultsTest
-        extends AbstractQi4jTest
+        extends AbstractZestTest
 {
 
     @Mixins( FooServiceMixin.class )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/dataset/iterable/IterableDataSetTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/dataset/iterable/IterableDataSetTest.java b/core/api/src/test/java/org/apache/zest/api/dataset/iterable/IterableDataSetTest.java
index 352edb6..675a05e 100644
--- a/core/api/src/test/java/org/apache/zest/api/dataset/iterable/IterableDataSetTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/dataset/iterable/IterableDataSetTest.java
@@ -25,14 +25,14 @@ import org.apache.zest.api.property.Property;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.functional.Iterables;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 
 /**
  * TODO
  */
 @Ignore( "Not implemented yet" )
 public class IterableDataSetTest
-    extends AbstractQi4jTest
+    extends AbstractZestTest
 {
     DataSet<TestValue> dataSet;
 

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/docsupport/ApplicationDocs.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/docsupport/ApplicationDocs.java b/core/api/src/test/java/org/apache/zest/api/docsupport/ApplicationDocs.java
index 7685a35..2d6769a 100644
--- a/core/api/src/test/java/org/apache/zest/api/docsupport/ApplicationDocs.java
+++ b/core/api/src/test/java/org/apache/zest/api/docsupport/ApplicationDocs.java
@@ -37,7 +37,7 @@ public class ApplicationDocs
     {
         {
 // START SNIPPET: application1
-            SingletonAssembler qi4j = new SingletonAssembler()
+            SingletonAssembler zest = new SingletonAssembler()
             {
                 public void assemble( ModuleAssembly assembly )
                     throws AssemblyException
@@ -80,8 +80,8 @@ public class ApplicationDocs
                       }
                     }
                 };
-            Energy4Java qi4j = new Energy4Java();
-            Application app = qi4j.newApplication( new ApplicationAssembler()
+            Energy4Java zest = new Energy4Java();
+            Application app = zest.newApplication( new ApplicationAssembler()
             {
 
                 @Override
@@ -111,13 +111,13 @@ public class ApplicationDocs
     }
 
     // START SNIPPET: application3
-    private static Energy4Java qi4j;
+    private static Energy4Java zest;
 
     public static void main( String[] args )
         throws Exception
     {
-        qi4j = new Energy4Java();
-        ApplicationDescriptor model = qi4j.newApplicationModel( new ApplicationAssembler()
+        zest = new Energy4Java();
+        ApplicationDescriptor model = zest.newApplicationModel( new ApplicationAssembler()
         {
             @Override
             public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
@@ -126,7 +126,7 @@ public class ApplicationDocs
                 return createAssembly( applicationFactory );
             }
         } );
-        Application application = model.newInstance( qi4j.spi() );
+        Application application = model.newInstance( zest.spi() );
     }
 
     private static ApplicationAssembly createAssembly( ApplicationAssemblyFactory factory )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/injection/scope/StateFieldTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/injection/scope/StateFieldTest.java b/core/api/src/test/java/org/apache/zest/api/injection/scope/StateFieldTest.java
index 07f98b0..02fc6ae 100644
--- a/core/api/src/test/java/org/apache/zest/api/injection/scope/StateFieldTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/injection/scope/StateFieldTest.java
@@ -26,14 +26,14 @@ import org.apache.zest.api.property.Property;
 import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.test.EntityTestAssembler;
 
 /**
  * Define a field to be a Property
  */
 public class StateFieldTest
-    extends AbstractQi4jTest
+    extends AbstractZestTest
 {
     public void assemble( ModuleAssembly module )
         throws AssemblyException

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/mixin/decoratorMixin/DecoratorMixinTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/mixin/decoratorMixin/DecoratorMixinTest.java b/core/api/src/test/java/org/apache/zest/api/mixin/decoratorMixin/DecoratorMixinTest.java
index 7361d2c..38e7a84 100644
--- a/core/api/src/test/java/org/apache/zest/api/mixin/decoratorMixin/DecoratorMixinTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/mixin/decoratorMixin/DecoratorMixinTest.java
@@ -24,12 +24,12 @@ import org.junit.Test;
 import org.apache.zest.api.composite.TransientBuilder;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 
 import static org.hamcrest.core.IsEqual.equalTo;
 import static org.junit.Assert.assertThat;
 
-public class DecoratorMixinTest extends AbstractQi4jTest
+public class DecoratorMixinTest extends AbstractZestTest
 {
     // START SNIPPET: assembly
     @Override

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/object/ObjectBuilderTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/object/ObjectBuilderTest.java b/core/api/src/test/java/org/apache/zest/api/object/ObjectBuilderTest.java
index 018c521..bd6a8b0 100644
--- a/core/api/src/test/java/org/apache/zest/api/object/ObjectBuilderTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/object/ObjectBuilderTest.java
@@ -18,7 +18,7 @@ import org.junit.Test;
 import org.apache.zest.api.injection.scope.Uses;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 
 import static org.junit.Assert.assertNotNull;
 
@@ -26,7 +26,7 @@ import static org.junit.Assert.assertNotNull;
  * JAVADOC
  */
 public class ObjectBuilderTest
-    extends AbstractQi4jTest
+    extends AbstractZestTest
 {
     public void assemble( ModuleAssembly module )
         throws AssemblyException

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/property/PropertyErrorTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/property/PropertyErrorTest.java b/core/api/src/test/java/org/apache/zest/api/property/PropertyErrorTest.java
index ef22b06..22488fa 100644
--- a/core/api/src/test/java/org/apache/zest/api/property/PropertyErrorTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/property/PropertyErrorTest.java
@@ -20,14 +20,14 @@ import org.apache.zest.api.entity.EntityComposite;
 import org.apache.zest.api.unitofwork.UnitOfWork;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.test.EntityTestAssembler;
 
 /**
  * Error messages for Properties
  */
 public class PropertyErrorTest
-    extends AbstractQi4jTest
+    extends AbstractZestTest
 {
     public void assemble( ModuleAssembly module )
         throws AssemblyException

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/unitofwork/RemovalTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/unitofwork/RemovalTest.java b/core/api/src/test/java/org/apache/zest/api/unitofwork/RemovalTest.java
index 7cfcc32..9f80c4f 100644
--- a/core/api/src/test/java/org/apache/zest/api/unitofwork/RemovalTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/unitofwork/RemovalTest.java
@@ -25,11 +25,11 @@ import org.apache.zest.api.entity.EntityComposite;
 import org.apache.zest.api.property.Property;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.test.EntityTestAssembler;
 
 public class RemovalTest
-    extends AbstractQi4jTest
+    extends AbstractZestTest
 {
     public void assemble( ModuleAssembly module )
         throws AssemblyException

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/unitofwork/UnitOfWorkTemplateTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/unitofwork/UnitOfWorkTemplateTest.java b/core/api/src/test/java/org/apache/zest/api/unitofwork/UnitOfWorkTemplateTest.java
index e32ac3b..9f64100 100644
--- a/core/api/src/test/java/org/apache/zest/api/unitofwork/UnitOfWorkTemplateTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/unitofwork/UnitOfWorkTemplateTest.java
@@ -24,14 +24,14 @@ import org.apache.zest.api.entity.EntityComposite;
 import org.apache.zest.api.property.Property;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.test.EntityTestAssembler;
 
 /**
  * TODO
  */
 public class UnitOfWorkTemplateTest
-    extends AbstractQi4jTest
+    extends AbstractZestTest
 {
     @Override
     public void assemble( ModuleAssembly module )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/util/ClassesTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/util/ClassesTest.java b/core/api/src/test/java/org/apache/zest/api/util/ClassesTest.java
index 5499aa8..151e5d5 100644
--- a/core/api/src/test/java/org/apache/zest/api/util/ClassesTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/util/ClassesTest.java
@@ -68,13 +68,13 @@ public class ClassesTest
     @Test
     public void givenClassNameWhenToUriThenUriIsReturned()
     {
-        assertThat( "URI is correct", Classes.toURI( A.class ), equalTo( "urn:qi4j:type:org.qi4j.api.util.ClassesTest-A" ) );
+        assertThat( "URI is correct", Classes.toURI( A.class ), equalTo( "urn:zest:type:org.apache.zest.api.util.ClassesTest-A" ) );
     }
 
     @Test
     public void givenUriWhenToClassNameThenClassNameIsReturned()
     {
-        assertThat( "Class name is correct", Classes.toClassName( "urn:qi4j:type:org.qi4j.api.util.ClassesTest-A" ), equalTo( "org.qi4j.api.util.ClassesTest$A" ) );
+        assertThat( "Class name is correct", Classes.toClassName( "urn:zest:type:org.apache.zest.api.util.ClassesTest-A" ), equalTo( "org.apache.zest.api.util.ClassesTest$A" ) );
     }
 
     @Test

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/value/DocumentationSupport.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/value/DocumentationSupport.java b/core/api/src/test/java/org/apache/zest/api/value/DocumentationSupport.java
index 2c2b998..9cf0a14 100644
--- a/core/api/src/test/java/org/apache/zest/api/value/DocumentationSupport.java
+++ b/core/api/src/test/java/org/apache/zest/api/value/DocumentationSupport.java
@@ -45,7 +45,7 @@ import org.apache.zest.functional.Function;
 import org.apache.zest.io.Inputs;
 import org.apache.zest.io.Outputs;
 import org.apache.zest.io.Transforms;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.valueserialization.orgjson.OrgJsonValueSerializationAssembler;
 
 import static org.hamcrest.CoreMatchers.equalTo;
@@ -58,7 +58,7 @@ import static org.junit.Assert.assertThat;
  * - lookup  : ValueSerialization values module finder
  */
 public class DocumentationSupport
-    extends AbstractQi4jTest
+    extends AbstractZestTest
 {
 
     @Before

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/value/ValueBuilderTemplateTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/value/ValueBuilderTemplateTest.java b/core/api/src/test/java/org/apache/zest/api/value/ValueBuilderTemplateTest.java
index 8da8dc9..f1b43dc 100644
--- a/core/api/src/test/java/org/apache/zest/api/value/ValueBuilderTemplateTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/value/ValueBuilderTemplateTest.java
@@ -22,13 +22,13 @@ import org.junit.Test;
 import org.apache.zest.api.property.Property;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 
 /**
  * TODO
  */
 public class ValueBuilderTemplateTest
-    extends AbstractQi4jTest
+    extends AbstractZestTest
 {
     @Override
     public void assemble( ModuleAssembly module )

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/api/src/test/java/org/apache/zest/api/value/ValueCompositeTest.java
----------------------------------------------------------------------
diff --git a/core/api/src/test/java/org/apache/zest/api/value/ValueCompositeTest.java b/core/api/src/test/java/org/apache/zest/api/value/ValueCompositeTest.java
index 494c249..89f75df 100644
--- a/core/api/src/test/java/org/apache/zest/api/value/ValueCompositeTest.java
+++ b/core/api/src/test/java/org/apache/zest/api/value/ValueCompositeTest.java
@@ -30,7 +30,7 @@ import org.apache.zest.api.unitofwork.UnitOfWorkCompletionException;
 import org.apache.zest.bootstrap.AssemblyException;
 import org.apache.zest.bootstrap.ModuleAssembly;
 import org.apache.zest.library.constraints.annotation.MaxLength;
-import org.apache.zest.test.AbstractQi4jTest;
+import org.apache.zest.test.AbstractZestTest;
 import org.apache.zest.test.EntityTestAssembler;
 
 import static org.hamcrest.CoreMatchers.equalTo;
@@ -42,7 +42,7 @@ import static org.junit.Assert.fail;
  * Tests for ValueComposites
  */
 public class ValueCompositeTest
-    extends AbstractQi4jTest
+    extends AbstractZestTest
 {
 
     @Override

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/build.gradle
----------------------------------------------------------------------
diff --git a/core/bootstrap/build.gradle b/core/bootstrap/build.gradle
index 7f43cdc..054218f 100644
--- a/core/bootstrap/build.gradle
+++ b/core/bootstrap/build.gradle
@@ -21,8 +21,8 @@ jar { manifest { name = "Apache Zest™ Core Bootstrap"}}
 
 dependencies {
 
-  compile project( ':org.qi4j.core:org.qi4j.core.spi' )
+  compile project( ':org.apache.zest.core:org.apache.zest.core.spi' )
 
-  testRuntime project( ':org.qi4j.core:org.qi4j.core.runtime' )
+  testRuntime project( ':org.apache.zest.core:org.apache.zest.core.runtime' )
 
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/dev-status.xml
----------------------------------------------------------------------
diff --git a/core/bootstrap/dev-status.xml b/core/bootstrap/dev-status.xml
index 4f034dc..5f3136c 100644
--- a/core/bootstrap/dev-status.xml
+++ b/core/bootstrap/dev-status.xml
@@ -15,10 +15,10 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1"
+<module xmlns="http://zest.apache.org/schemas/2008/dev-status/1"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.qi4j.org/schemas/2008/dev-status/1
-        http://www.qi4j.org/schemas/2008/dev-status/1/dev-status.xsd">
+        xsi:schemaLocation="http://zest.apache.org/schemas/2008/dev-status/1
+        http://zest.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
   <status>
     <codebase>stable</codebase>
     <!--none,early,beta,stable,mature-->

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/src/main/java/org/apache/zest/bootstrap/Energy4Java.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/Energy4Java.java b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/Energy4Java.java
index 4661417..f7b61c2 100644
--- a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/Energy4Java.java
+++ b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/Energy4Java.java
@@ -18,10 +18,10 @@
 
 package org.apache.zest.bootstrap;
 
-import org.apache.zest.api.Qi4j;
+import org.apache.zest.api.ZestAPI;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.ApplicationDescriptor;
-import org.apache.zest.spi.Qi4jSPI;
+import org.apache.zest.spi.ZestSPI;
 
 /**
  * Main bootstrap class for starting Zest and creating new applications.
@@ -30,12 +30,12 @@ import org.apache.zest.spi.Qi4jSPI;
  * </p>
  * <p>
  * This class will use the Service Loader mechanism in Java to try to locate a runtime that implements
- * the Qi4jRuntime interface. This avoids a direct dependency from the bootstrap to the runtime.
+ * the ZestRuntime interface. This avoids a direct dependency from the bootstrap to the runtime.
  * </p>
  */
 public final class Energy4Java
 {
-    private Qi4jRuntime runtime;
+    private ZestRuntime runtime;
 
     public Energy4Java( RuntimeFactory runtimeFactory )
     {
@@ -47,7 +47,7 @@ public final class Energy4Java
         this( new RuntimeFactory.StandaloneApplicationRuntimeFactory().createRuntime() );
     }
 
-    public Energy4Java( Qi4jRuntime runtime )
+    public Energy4Java( ZestRuntime runtime )
     {
         if( runtime == null )
         {
@@ -84,12 +84,12 @@ public final class Energy4Java
         return model.newInstance( runtime.spi(), importedServiceInstances );
     }
 
-    public Qi4jSPI spi()
+    public ZestSPI spi()
     {
         return runtime.spi();
     }
 
-    public Qi4j api()
+    public ZestAPI api()
     {
         return runtime.spi();
     }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/src/main/java/org/apache/zest/bootstrap/Qi4jRuntime.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/Qi4jRuntime.java b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/Qi4jRuntime.java
deleted file mode 100644
index d0914bc..0000000
--- a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/Qi4jRuntime.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2009, Rickard Öberg. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-
-package org.apache.zest.bootstrap;
-
-import org.apache.zest.api.Qi4j;
-import org.apache.zest.spi.Qi4jSPI;
-
-/**
- * This interface has to be implemented by Zest runtimes.
- */
-public interface Qi4jRuntime
-{
-    ApplicationAssemblyFactory applicationAssemblyFactory();
-
-    ApplicationModelFactory applicationModelFactory();
-
-    Qi4j api();
-
-    Qi4jSPI spi();
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/src/main/java/org/apache/zest/bootstrap/RuntimeFactory.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/RuntimeFactory.java b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/RuntimeFactory.java
index e9631af..96dc7f9 100644
--- a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/RuntimeFactory.java
+++ b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/RuntimeFactory.java
@@ -23,7 +23,7 @@ package org.apache.zest.bootstrap;
  */
 public interface RuntimeFactory
 {
-    Qi4jRuntime createRuntime();
+    ZestRuntime createRuntime();
 
     /**
      * Standalone application Zest runtime factory.
@@ -32,12 +32,12 @@ public interface RuntimeFactory
         implements RuntimeFactory
     {
         @Override
-        public Qi4jRuntime createRuntime()
+        public ZestRuntime createRuntime()
         {
             ClassLoader loader = getClass().getClassLoader();
             try
             {
-                Class<? extends Qi4jRuntime> runtimeClass = loadRuntimeClass( loader );
+                Class<? extends ZestRuntime> runtimeClass = loadRuntimeClass( loader );
                 return runtimeClass.newInstance();
             }
             catch( ClassNotFoundException e )
@@ -47,16 +47,16 @@ public interface RuntimeFactory
             catch( InstantiationException | IllegalAccessException e )
             {
                 System.err.println( "Invalid Zest Runtime class. If you are providing your own Zest Runtime, please " +
-                                    "contact qi4j-dev at Google Groups for assistance." );
+                                    "contact dev@zest.apache.org mailing list for assistance." );
             }
             return null;
         }
 
         @SuppressWarnings( { "unchecked" } )
-        private Class<? extends Qi4jRuntime> loadRuntimeClass( ClassLoader loader )
+        private Class<? extends ZestRuntime> loadRuntimeClass( ClassLoader loader )
             throws ClassNotFoundException
         {
-            return (Class<? extends Qi4jRuntime>) loader.loadClass( "org.qi4j.runtime.Qi4jRuntimeImpl" );
+            return (Class<? extends ZestRuntime>) loader.loadClass( "org.apache.zest.runtime.ZestRuntimeImpl" );
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/src/main/java/org/apache/zest/bootstrap/SingletonAssembler.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/SingletonAssembler.java b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/SingletonAssembler.java
index 1666f7a..011a536 100644
--- a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/SingletonAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/SingletonAssembler.java
@@ -14,7 +14,7 @@
 
 package org.apache.zest.bootstrap;
 
-import org.apache.zest.api.Qi4j;
+import org.apache.zest.api.ZestAPI;
 import org.apache.zest.api.activation.ActivationException;
 import org.apache.zest.api.structure.Application;
 import org.apache.zest.api.structure.Module;
@@ -30,7 +30,7 @@ import org.apache.zest.api.structure.Module;
 public abstract class SingletonAssembler
     implements Assembler
 {
-    private Energy4Java qi4j;
+    private Energy4Java zest;
     private Application applicationInstance;
     private final Module moduleInstance;
 
@@ -48,8 +48,8 @@ public abstract class SingletonAssembler
         throws AssemblyException, ActivationException
     {
 // START SNIPPET: actual
-        qi4j = new Energy4Java();
-        applicationInstance = qi4j.newApplication( new ApplicationAssembler()
+        zest = new Energy4Java();
+        applicationInstance = zest.newApplication( new ApplicationAssembler()
         {
             @Override
             public ApplicationAssembly assemble( ApplicationAssemblyFactory applicationFactory )
@@ -77,9 +77,9 @@ public abstract class SingletonAssembler
         moduleInstance = applicationInstance.findModule( "Layer 1", "Module 1" );
     }
 
-    public final Qi4j runtime()
+    public final ZestAPI runtime()
     {
-        return qi4j.spi();
+        return zest.spi();
     }
 
     public final Application application()

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/src/main/java/org/apache/zest/bootstrap/ZestRuntime.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/ZestRuntime.java b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/ZestRuntime.java
new file mode 100644
index 0000000..a1ae6c2
--- /dev/null
+++ b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/ZestRuntime.java
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2009, Rickard Öberg. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+package org.apache.zest.bootstrap;
+
+import org.apache.zest.api.ZestAPI;
+import org.apache.zest.spi.ZestSPI;
+
+/**
+ * This interface has to be implemented by Zest runtimes.
+ */
+public interface ZestRuntime
+{
+    ApplicationAssemblyFactory applicationAssemblyFactory();
+
+    ApplicationModelFactory applicationModelFactory();
+
+    ZestAPI api();
+
+    ZestSPI spi();
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/src/main/java/org/apache/zest/bootstrap/builder/ApplicationBuilder.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/builder/ApplicationBuilder.java b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/builder/ApplicationBuilder.java
index 5532ae7..ed73c8e 100644
--- a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/builder/ApplicationBuilder.java
+++ b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/builder/ApplicationBuilder.java
@@ -64,8 +64,8 @@ public class ApplicationBuilder
     public Application newApplication()
         throws AssemblyException, ActivationException
     {
-        Energy4Java qi4j = new Energy4Java();
-        ApplicationDescriptor model = qi4j.newApplicationModel( new ApplicationAssembler()
+        Energy4Java zest = new Energy4Java();
+        ApplicationDescriptor model = zest.newApplicationModel( new ApplicationAssembler()
         {
             @Override
             public ApplicationAssembly assemble( ApplicationAssemblyFactory factory )
@@ -86,7 +86,7 @@ public class ApplicationBuilder
                 return assembly;
             }
         } );
-        Application application = model.newInstance( qi4j.api() );
+        Application application = model.newInstance( zest.api() );
         for( ActivationEventListener activationListener : activationListeners )
         {
             application.registerActivationEventListener( activationListener );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/src/main/java/org/apache/zest/bootstrap/layered/LayeredApplicationAssembler.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/layered/LayeredApplicationAssembler.java b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/layered/LayeredApplicationAssembler.java
index a55fb9c..3250de5 100644
--- a/core/bootstrap/src/main/java/org/apache/zest/bootstrap/layered/LayeredApplicationAssembler.java
+++ b/core/bootstrap/src/main/java/org/apache/zest/bootstrap/layered/LayeredApplicationAssembler.java
@@ -50,10 +50,10 @@ public abstract class LayeredApplicationAssembler
         this.name = name;
         this.version = version;
         this.mode = mode;
-        Energy4Java qi4j = new Energy4Java();
-        ApplicationDescriptor model = qi4j.newApplicationModel( this );
+        Energy4Java zest = new Energy4Java();
+        ApplicationDescriptor model = zest.newApplicationModel( this );
         onModelCreated( model );
-        instantiateApplication( qi4j, model );
+        instantiateApplication( zest, model );
     }
 
     public ApplicationAssembly assembly()
@@ -68,15 +68,15 @@ public abstract class LayeredApplicationAssembler
      * The default implementation simply calls;
      * </p>
      * <pre><code>
-     *   application = model.newInstance( qi4j.spi() );
+     *   application = model.newInstance( zest.spi() );
      * </code></pre>
      *
-     * @param qi4j  The Zest runtime engine.
+     * @param zest  The Zest runtime engine.
      * @param model The application model descriptor.
      */
-    protected void instantiateApplication( Energy4Java qi4j, ApplicationDescriptor model )
+    protected void instantiateApplication( Energy4Java zest, ApplicationDescriptor model )
     {
-        application = model.newInstance( qi4j.spi() );
+        application = model.newInstance( zest.spi() );
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/src/test/java/org/apache/zest/bootstrap/DocumentationSupport.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/test/java/org/apache/zest/bootstrap/DocumentationSupport.java b/core/bootstrap/src/test/java/org/apache/zest/bootstrap/DocumentationSupport.java
index 504f52d..6522f57 100644
--- a/core/bootstrap/src/test/java/org/apache/zest/bootstrap/DocumentationSupport.java
+++ b/core/bootstrap/src/test/java/org/apache/zest/bootstrap/DocumentationSupport.java
@@ -235,13 +235,13 @@ public class DocumentationSupport
         public static class PricingAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
         public static class ProductAssembler implements Assembler { public void assemble( ModuleAssembly module ) throws AssemblyException { } }
 
-        private static Energy4Java qi4j;
+        private static Energy4Java zest;
 
         // START SNIPPET: pancake
         public static void main( String[] args )
                 throws Exception
         {
-            qi4j = new Energy4Java();
+            zest = new Energy4Java();
             Assembler[][][] assemblers = new Assembler[][][]{
                 { // View Layer
                     { // Login Module
@@ -281,14 +281,14 @@ public class DocumentationSupport
                 }
             };
             ApplicationDescriptor model = newApplication( assemblers );
-            Application runtime = model.newInstance( qi4j.spi() );
+            Application runtime = model.newInstance( zest.spi() );
             runtime.activate();
         }
 
         private static ApplicationDescriptor newApplication( final Assembler[][][] assemblers )
                 throws AssemblyException
         {
-            return qi4j.newApplicationModel( new ApplicationAssembler()
+            return zest.newApplicationModel( new ApplicationAssembler()
             {
 
                 @Override
@@ -320,7 +320,7 @@ public class DocumentationSupport
         public static class NeoAssembler implements Assembler{ NeoAssembler( String path ) {} public void assemble( ModuleAssembly module ) throws AssemblyException { } }
 
         // START SNIPPET: full
-        private static Energy4Java qi4j;
+        private static Energy4Java zest;
 
         private static Application application;
 
@@ -328,8 +328,8 @@ public class DocumentationSupport
                 throws Exception
         {
             // Create a Zest Runtime
-            qi4j = new Energy4Java();
-            application = qi4j.newApplication( new ApplicationAssembler()
+            zest = new Energy4Java();
+            application = zest.newApplication( new ApplicationAssembler()
             {
 
                 @Override

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/bootstrap/src/test/java/org/apache/zest/bootstrap/builder/ApplicationBuilderTest.java
----------------------------------------------------------------------
diff --git a/core/bootstrap/src/test/java/org/apache/zest/bootstrap/builder/ApplicationBuilderTest.java b/core/bootstrap/src/test/java/org/apache/zest/bootstrap/builder/ApplicationBuilderTest.java
index 2639c10..a235084 100644
--- a/core/bootstrap/src/test/java/org/apache/zest/bootstrap/builder/ApplicationBuilderTest.java
+++ b/core/bootstrap/src/test/java/org/apache/zest/bootstrap/builder/ApplicationBuilderTest.java
@@ -95,7 +95,7 @@ public class ApplicationBuilderTest
         "                {\n" +
         "                    \"name\" : \"test module\",\n" +
         "                    \"assemblers\" : [\n" +
-        "                            \"org.qi4j.bootstrap.builder.ApplicationBuilderTest$TestServiceAssembler\"\n" +
+        "                            \"org.apache.zest.bootstrap.builder.ApplicationBuilderTest$TestServiceAssembler\"\n" +
         "                    ]\n" +
         "                }\n" +
         "            ]\n" +

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/functional/dev-status.xml
----------------------------------------------------------------------
diff --git a/core/functional/dev-status.xml b/core/functional/dev-status.xml
index ed93800..62b3b7d 100644
--- a/core/functional/dev-status.xml
+++ b/core/functional/dev-status.xml
@@ -15,10 +15,10 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1"
+<module xmlns="http://zest.apache.org/schemas/2008/dev-status/1"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.qi4j.org/schemas/2008/dev-status/1
-        http://www.qi4j.org/schemas/2008/dev-status/1/dev-status.xsd">
+        xsi:schemaLocation="http://zest.apache.org/schemas/2008/dev-status/1
+        http://zest.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
   <status>
     <codebase>beta</codebase>
     <!--none,early,beta,stable,mature-->

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/io/build.gradle
----------------------------------------------------------------------
diff --git a/core/io/build.gradle b/core/io/build.gradle
index e67866f..1a50d58 100644
--- a/core/io/build.gradle
+++ b/core/io/build.gradle
@@ -21,8 +21,8 @@ jar { manifest { name = "Apache Zest™ I/O"}}
 
 dependencies {
 
-  compile project( ':org.qi4j.core:org.qi4j.core.functional' )
+  compile project( ':org.apache.zest.core:org.apache.zest.core.functional' )
 
-  testCompile project( ':org.qi4j.core:org.qi4j.core.testsupport' )
+  testCompile project( ':org.apache.zest.core:org.apache.zest.core.testsupport' )
 
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/io/dev-status.xml
----------------------------------------------------------------------
diff --git a/core/io/dev-status.xml b/core/io/dev-status.xml
index ed93800..62b3b7d 100644
--- a/core/io/dev-status.xml
+++ b/core/io/dev-status.xml
@@ -15,10 +15,10 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1"
+<module xmlns="http://zest.apache.org/schemas/2008/dev-status/1"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.qi4j.org/schemas/2008/dev-status/1
-        http://www.qi4j.org/schemas/2008/dev-status/1/dev-status.xsd">
+        xsi:schemaLocation="http://zest.apache.org/schemas/2008/dev-status/1
+        http://zest.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
   <status>
     <codebase>beta</codebase>
     <!--none,early,beta,stable,mature-->

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/runtime/build.gradle
----------------------------------------------------------------------
diff --git a/core/runtime/build.gradle b/core/runtime/build.gradle
index 1ddf701..a69a0f2 100644
--- a/core/runtime/build.gradle
+++ b/core/runtime/build.gradle
@@ -23,11 +23,11 @@ dependencies {
 
   provided libraries.osgi_core
 
-  compile project( ":org.qi4j.core:org.qi4j.core.bootstrap" )
+  compile project( ":org.apache.zest.core:org.apache.zest.core.bootstrap" )
   compile libraries.asm
   compile libraries.asm_util
   compile libraries.asm_commons
 
-  testCompile project( ":org.qi4j.core:org.qi4j.core.testsupport" )
-  testCompile project( ":org.qi4j.libraries:org.qi4j.library.constraints" )
+  testCompile project( ":org.apache.zest.core:org.apache.zest.core.testsupport" )
+  testCompile project( ":org.apache.zest.libraries:org.apache.zest.library.constraints" )
 }

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/runtime/dev-status.xml
----------------------------------------------------------------------
diff --git a/core/runtime/dev-status.xml b/core/runtime/dev-status.xml
index 4f034dc..5f3136c 100644
--- a/core/runtime/dev-status.xml
+++ b/core/runtime/dev-status.xml
@@ -15,10 +15,10 @@
   See the License for the specific language governing permissions and
   limitations under the License.
 -->
-<module xmlns="http://www.qi4j.org/schemas/2008/dev-status/1"
+<module xmlns="http://zest.apache.org/schemas/2008/dev-status/1"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-        xsi:schemaLocation="http://www.qi4j.org/schemas/2008/dev-status/1
-        http://www.qi4j.org/schemas/2008/dev-status/1/dev-status.xsd">
+        xsi:schemaLocation="http://zest.apache.org/schemas/2008/dev-status/1
+        http://zest.apache.org/schemas/2008/dev-status/1/dev-status.xsd">
   <status>
     <codebase>stable</codebase>
     <!--none,early,beta,stable,mature-->

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/runtime/src/main/java/org/apache/zest/runtime/Qi4jRuntimeImpl.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/Qi4jRuntimeImpl.java b/core/runtime/src/main/java/org/apache/zest/runtime/Qi4jRuntimeImpl.java
deleted file mode 100644
index bbab6cb..0000000
--- a/core/runtime/src/main/java/org/apache/zest/runtime/Qi4jRuntimeImpl.java
+++ /dev/null
@@ -1,358 +0,0 @@
-/*
- * Copyright (c) 2007, Rickard Öberg. All Rights Reserved.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- */
-package org.apache.zest.runtime;
-
-import java.lang.reflect.InvocationHandler;
-import java.util.Arrays;
-import java.util.Map;
-import org.apache.zest.api.Qi4j;
-import org.apache.zest.api.association.AbstractAssociation;
-import org.apache.zest.api.association.Association;
-import org.apache.zest.api.association.AssociationDescriptor;
-import org.apache.zest.api.association.AssociationStateHolder;
-import org.apache.zest.api.association.AssociationWrapper;
-import org.apache.zest.api.association.ManyAssociation;
-import org.apache.zest.api.association.ManyAssociationWrapper;
-import org.apache.zest.api.association.NamedAssociation;
-import org.apache.zest.api.association.NamedAssociationWrapper;
-import org.apache.zest.api.composite.Composite;
-import org.apache.zest.api.composite.CompositeDescriptor;
-import org.apache.zest.api.composite.CompositeInstance;
-import org.apache.zest.api.composite.ModelDescriptor;
-import org.apache.zest.api.composite.TransientComposite;
-import org.apache.zest.api.composite.TransientDescriptor;
-import org.apache.zest.api.entity.EntityComposite;
-import org.apache.zest.api.entity.EntityDescriptor;
-import org.apache.zest.api.entity.EntityReference;
-import org.apache.zest.api.property.Property;
-import org.apache.zest.api.property.PropertyDescriptor;
-import org.apache.zest.api.property.PropertyWrapper;
-import org.apache.zest.api.property.StateHolder;
-import org.apache.zest.api.service.ServiceComposite;
-import org.apache.zest.api.service.ServiceDescriptor;
-import org.apache.zest.api.service.ServiceReference;
-import org.apache.zest.api.structure.Module;
-import org.apache.zest.api.unitofwork.UnitOfWork;
-import org.apache.zest.api.value.ValueComposite;
-import org.apache.zest.api.value.ValueDescriptor;
-import org.apache.zest.bootstrap.ApplicationAssemblyFactory;
-import org.apache.zest.bootstrap.ApplicationModelFactory;
-import org.apache.zest.bootstrap.Qi4jRuntime;
-import org.apache.zest.runtime.association.AbstractAssociationInstance;
-import org.apache.zest.runtime.association.AssociationInstance;
-import org.apache.zest.runtime.association.ManyAssociationInstance;
-import org.apache.zest.runtime.association.NamedAssociationInstance;
-import org.apache.zest.runtime.bootstrap.ApplicationAssemblyFactoryImpl;
-import org.apache.zest.runtime.bootstrap.ApplicationModelFactoryImpl;
-import org.apache.zest.runtime.composite.ProxyReferenceInvocationHandler;
-import org.apache.zest.runtime.composite.TransientInstance;
-import org.apache.zest.runtime.entity.EntityInstance;
-import org.apache.zest.runtime.property.PropertyInstance;
-import org.apache.zest.runtime.service.ImportedServiceReferenceInstance;
-import org.apache.zest.runtime.service.ServiceInstance;
-import org.apache.zest.runtime.service.ServiceReferenceInstance;
-import org.apache.zest.runtime.structure.ModuleUnitOfWork;
-import org.apache.zest.runtime.value.ValueInstance;
-import org.apache.zest.spi.Qi4jSPI;
-import org.apache.zest.spi.entity.EntityState;
-
-import static java.lang.reflect.Proxy.getInvocationHandler;
-import static org.apache.zest.runtime.composite.TransientInstance.compositeInstanceOf;
-
-/**
- * Incarnation of Zest.
- */
-public final class Qi4jRuntimeImpl
-    implements Qi4jSPI, Qi4jRuntime
-{
-    private final ApplicationAssemblyFactory applicationAssemblyFactory;
-    private final ApplicationModelFactory applicationModelFactory;
-
-    public Qi4jRuntimeImpl()
-    {
-        applicationAssemblyFactory = new ApplicationAssemblyFactoryImpl();
-        applicationModelFactory = new ApplicationModelFactoryImpl();
-    }
-
-    @Override
-    public ApplicationAssemblyFactory applicationAssemblyFactory()
-    {
-        return applicationAssemblyFactory;
-    }
-
-    @Override
-    public ApplicationModelFactory applicationModelFactory()
-    {
-        return applicationModelFactory;
-    }
-
-    @Override
-    public Qi4j api()
-    {
-        return this;
-    }
-
-    @Override
-    public Qi4jSPI spi()
-    {
-        return this;
-    }
-
-    // API
-
-    @Override
-    @SuppressWarnings( "unchecked" )
-    public <T> T dereference( T composite )
-    {
-        InvocationHandler handler = getInvocationHandler( composite );
-        if( handler instanceof ProxyReferenceInvocationHandler )
-        {
-            return (T) ( (ProxyReferenceInvocationHandler) handler ).proxy();
-        }
-        if( handler instanceof CompositeInstance )
-        {
-            return composite;
-        }
-        return null;
-    }
-
-    @Override
-    public Module moduleOf( Object compositeOrServiceReferenceOrUow )
-    {
-        if( compositeOrServiceReferenceOrUow instanceof TransientComposite )
-        {
-            TransientComposite composite = (TransientComposite) compositeOrServiceReferenceOrUow;
-            return TransientInstance.compositeInstanceOf( composite ).module();
-        }
-        else if( compositeOrServiceReferenceOrUow instanceof EntityComposite )
-        {
-            EntityComposite composite = (EntityComposite) compositeOrServiceReferenceOrUow;
-            return EntityInstance.entityInstanceOf( composite ).module();
-        }
-        else if( compositeOrServiceReferenceOrUow instanceof ValueComposite )
-        {
-            ValueComposite composite = (ValueComposite) compositeOrServiceReferenceOrUow;
-            return ValueInstance.valueInstanceOf( composite ).module();
-        }
-        else if( compositeOrServiceReferenceOrUow instanceof ServiceComposite )
-        {
-            ServiceComposite composite = (ServiceComposite) compositeOrServiceReferenceOrUow;
-            InvocationHandler handler = getInvocationHandler( composite );
-            if( handler instanceof ServiceInstance )
-            {
-                return ( (ServiceInstance) handler ).module();
-            }
-            return ( (ServiceReferenceInstance.ServiceInvocationHandler) handler ).module();
-        }
-        else if( compositeOrServiceReferenceOrUow instanceof UnitOfWork )
-        {
-            ModuleUnitOfWork unitOfWork = (ModuleUnitOfWork) compositeOrServiceReferenceOrUow;
-            return unitOfWork.module();
-        }
-        else if( compositeOrServiceReferenceOrUow instanceof ServiceReferenceInstance )
-        {
-            ServiceReferenceInstance<?> reference = (ServiceReferenceInstance<?>) compositeOrServiceReferenceOrUow;
-            return reference.module();
-        }
-        else if( compositeOrServiceReferenceOrUow instanceof ImportedServiceReferenceInstance )
-        {
-            ImportedServiceReferenceInstance<?> importedServiceReference
-                = (ImportedServiceReferenceInstance<?>) compositeOrServiceReferenceOrUow;
-            return importedServiceReference.module();
-        }
-        throw new IllegalArgumentException( "Wrong type. Must be one of "
-                                            + Arrays.asList( TransientComposite.class, ValueComposite.class,
-                                                             ServiceComposite.class, ServiceReference.class,
-                                                             UnitOfWork.class ) );
-    }
-
-    @Override
-    public ModelDescriptor modelDescriptorFor( Object compositeOrServiceReference )
-    {
-        if( compositeOrServiceReference instanceof TransientComposite )
-        {
-            TransientComposite composite = (TransientComposite) compositeOrServiceReference;
-            return TransientInstance.compositeInstanceOf( composite ).descriptor();
-        }
-        else if( compositeOrServiceReference instanceof EntityComposite )
-        {
-            EntityComposite composite = (EntityComposite) compositeOrServiceReference;
-            return EntityInstance.entityInstanceOf( composite ).descriptor();
-        }
-        else if( compositeOrServiceReference instanceof ValueComposite )
-        {
-            ValueComposite composite = (ValueComposite) compositeOrServiceReference;
-            return ValueInstance.valueInstanceOf( composite ).descriptor();
-        }
-        else if( compositeOrServiceReference instanceof ServiceComposite )
-        {
-            ServiceComposite composite = (ServiceComposite) compositeOrServiceReference;
-            InvocationHandler handler = getInvocationHandler( composite );
-            if( handler instanceof ServiceInstance )
-            {
-                return ( (ServiceInstance) handler ).descriptor();
-            }
-            return ( (ServiceReferenceInstance.ServiceInvocationHandler) handler ).descriptor();
-        }
-        else if( compositeOrServiceReference instanceof ServiceReferenceInstance )
-        {
-            ServiceReferenceInstance<?> reference = (ServiceReferenceInstance<?>) compositeOrServiceReference;
-            return reference.serviceDescriptor();
-        }
-        else if( compositeOrServiceReference instanceof ImportedServiceReferenceInstance )
-        {
-            ImportedServiceReferenceInstance<?> importedServiceReference
-                = (ImportedServiceReferenceInstance<?>) compositeOrServiceReference;
-            return importedServiceReference.serviceDescriptor();
-        }
-        throw new IllegalArgumentException( "Wrong type. Must be one of "
-                                            + Arrays.asList( TransientComposite.class, ValueComposite.class,
-                                                             ServiceComposite.class, ServiceReference.class ) );
-    }
-
-    @Override
-    public CompositeDescriptor compositeDescriptorFor( Object compositeOrServiceReference )
-    {
-        return (CompositeDescriptor) modelDescriptorFor( compositeOrServiceReference );
-    }
-
-    // Descriptors
-
-    @Override
-    public TransientDescriptor transientDescriptorFor( Object transsient )
-    {
-        if( transsient instanceof TransientComposite )
-        {
-            TransientInstance transientInstance = compositeInstanceOf( (Composite) transsient );
-            return (TransientDescriptor) transientInstance.descriptor();
-        }
-        throw new IllegalArgumentException( "Wrong type. Must be subtype of " + TransientComposite.class );
-    }
-
-    @Override
-    public StateHolder stateOf( TransientComposite composite )
-    {
-        return TransientInstance.compositeInstanceOf( composite ).state();
-    }
-
-    @Override
-    public EntityDescriptor entityDescriptorFor( Object entity )
-    {
-        if( entity instanceof EntityComposite )
-        {
-            EntityInstance entityInstance = (EntityInstance) getInvocationHandler( entity );
-            return entityInstance.entityModel();
-        }
-        throw new IllegalArgumentException( "Wrong type. Must be subtype of " + EntityComposite.class );
-    }
-
-    @Override
-    public AssociationStateHolder stateOf( EntityComposite composite )
-    {
-        return EntityInstance.entityInstanceOf( composite ).state();
-    }
-
-    @Override
-    public ValueDescriptor valueDescriptorFor( Object value )
-    {
-        if( value instanceof ValueComposite )
-        {
-            ValueInstance valueInstance = ValueInstance.valueInstanceOf( (ValueComposite) value );
-            return valueInstance.descriptor();
-        }
-        throw new IllegalArgumentException( "Wrong type. Must be subtype of " + ValueComposite.class );
-    }
-
-    @Override
-    public AssociationStateHolder stateOf( ValueComposite composite )
-    {
-        return ValueInstance.valueInstanceOf( composite ).state();
-    }
-
-    @Override
-    public ServiceDescriptor serviceDescriptorFor( Object service )
-    {
-        if( service instanceof ServiceReferenceInstance )
-        {
-            ServiceReferenceInstance<?> ref = (ServiceReferenceInstance<?>) service;
-            return ref.serviceDescriptor();
-        }
-        if( service instanceof ServiceComposite )
-        {
-            ServiceComposite composite = (ServiceComposite) service;
-            return (ServiceDescriptor) ServiceInstance.serviceInstanceOf( composite ).descriptor();
-        }
-        throw new IllegalArgumentException( "Wrong type. Must be subtype of "
-                                            + ServiceComposite.class + " or " + ServiceReference.class );
-    }
-
-    @Override
-    public PropertyDescriptor propertyDescriptorFor( Property<?> property )
-    {
-        while( property instanceof PropertyWrapper )
-        {
-            property = ( (PropertyWrapper) property ).next();
-        }
-
-        return (PropertyDescriptor) ( (PropertyInstance<?>) property ).propertyInfo();
-    }
-
-    @Override
-    public AssociationDescriptor associationDescriptorFor( AbstractAssociation association )
-    {
-        while( association instanceof AssociationWrapper )
-        {
-            association = ( (AssociationWrapper) association ).next();
-        }
-
-        while( association instanceof ManyAssociationWrapper )
-        {
-            association = ( (ManyAssociationWrapper) association ).next();
-        }
-
-        while( association instanceof NamedAssociationWrapper )
-        {
-            association = ( (NamedAssociationWrapper) association ).next();
-        }
-
-        return (AssociationDescriptor) ( (AbstractAssociationInstance) association ).associationInfo();
-    }
-
-    // SPI
-    @Override
-    public EntityState entityStateOf( EntityComposite composite )
-    {
-        return EntityInstance.entityInstanceOf( composite ).entityState();
-    }
-
-    @Override
-    public EntityReference entityReferenceOf( Association assoc )
-    {
-        @SuppressWarnings( "unchecked" )
-        Property<EntityReference> associationState = ( (AssociationInstance) assoc ).getAssociationState();
-        return associationState.get();
-    }
-
-    @Override
-    public Iterable<EntityReference> entityReferenceOf( ManyAssociation assoc )
-    {
-        return ( (ManyAssociationInstance) assoc ).getManyAssociationState();
-    }
-
-    @Override
-    public Iterable<Map.Entry<String, EntityReference>> entityReferenceOf( NamedAssociation assoc )
-    {
-        return ( (NamedAssociationInstance) assoc ).getEntityReferences();
-    }
-}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/runtime/src/main/java/org/apache/zest/runtime/ZestRuntimeImpl.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/ZestRuntimeImpl.java b/core/runtime/src/main/java/org/apache/zest/runtime/ZestRuntimeImpl.java
new file mode 100644
index 0000000..ac931fa
--- /dev/null
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/ZestRuntimeImpl.java
@@ -0,0 +1,358 @@
+/*
+ * Copyright (c) 2007, Rickard Öberg. All Rights Reserved.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+package org.apache.zest.runtime;
+
+import java.lang.reflect.InvocationHandler;
+import java.util.Arrays;
+import java.util.Map;
+import org.apache.zest.api.ZestAPI;
+import org.apache.zest.api.association.AbstractAssociation;
+import org.apache.zest.api.association.Association;
+import org.apache.zest.api.association.AssociationDescriptor;
+import org.apache.zest.api.association.AssociationStateHolder;
+import org.apache.zest.api.association.AssociationWrapper;
+import org.apache.zest.api.association.ManyAssociation;
+import org.apache.zest.api.association.ManyAssociationWrapper;
+import org.apache.zest.api.association.NamedAssociation;
+import org.apache.zest.api.association.NamedAssociationWrapper;
+import org.apache.zest.api.composite.Composite;
+import org.apache.zest.api.composite.CompositeDescriptor;
+import org.apache.zest.api.composite.CompositeInstance;
+import org.apache.zest.api.composite.ModelDescriptor;
+import org.apache.zest.api.composite.TransientComposite;
+import org.apache.zest.api.composite.TransientDescriptor;
+import org.apache.zest.api.entity.EntityComposite;
+import org.apache.zest.api.entity.EntityDescriptor;
+import org.apache.zest.api.entity.EntityReference;
+import org.apache.zest.api.property.Property;
+import org.apache.zest.api.property.PropertyDescriptor;
+import org.apache.zest.api.property.PropertyWrapper;
+import org.apache.zest.api.property.StateHolder;
+import org.apache.zest.api.service.ServiceComposite;
+import org.apache.zest.api.service.ServiceDescriptor;
+import org.apache.zest.api.service.ServiceReference;
+import org.apache.zest.api.structure.Module;
+import org.apache.zest.api.unitofwork.UnitOfWork;
+import org.apache.zest.api.value.ValueComposite;
+import org.apache.zest.api.value.ValueDescriptor;
+import org.apache.zest.bootstrap.ApplicationAssemblyFactory;
+import org.apache.zest.bootstrap.ApplicationModelFactory;
+import org.apache.zest.bootstrap.ZestRuntime;
+import org.apache.zest.runtime.association.AbstractAssociationInstance;
+import org.apache.zest.runtime.association.AssociationInstance;
+import org.apache.zest.runtime.association.ManyAssociationInstance;
+import org.apache.zest.runtime.association.NamedAssociationInstance;
+import org.apache.zest.runtime.bootstrap.ApplicationAssemblyFactoryImpl;
+import org.apache.zest.runtime.bootstrap.ApplicationModelFactoryImpl;
+import org.apache.zest.runtime.composite.ProxyReferenceInvocationHandler;
+import org.apache.zest.runtime.composite.TransientInstance;
+import org.apache.zest.runtime.entity.EntityInstance;
+import org.apache.zest.runtime.property.PropertyInstance;
+import org.apache.zest.runtime.service.ImportedServiceReferenceInstance;
+import org.apache.zest.runtime.service.ServiceInstance;
+import org.apache.zest.runtime.service.ServiceReferenceInstance;
+import org.apache.zest.runtime.structure.ModuleUnitOfWork;
+import org.apache.zest.runtime.value.ValueInstance;
+import org.apache.zest.spi.ZestSPI;
+import org.apache.zest.spi.entity.EntityState;
+
+import static java.lang.reflect.Proxy.getInvocationHandler;
+import static org.apache.zest.runtime.composite.TransientInstance.compositeInstanceOf;
+
+/**
+ * Incarnation of Zest.
+ */
+public final class ZestRuntimeImpl
+    implements ZestSPI, ZestRuntime
+{
+    private final ApplicationAssemblyFactory applicationAssemblyFactory;
+    private final ApplicationModelFactory applicationModelFactory;
+
+    public ZestRuntimeImpl()
+    {
+        applicationAssemblyFactory = new ApplicationAssemblyFactoryImpl();
+        applicationModelFactory = new ApplicationModelFactoryImpl();
+    }
+
+    @Override
+    public ApplicationAssemblyFactory applicationAssemblyFactory()
+    {
+        return applicationAssemblyFactory;
+    }
+
+    @Override
+    public ApplicationModelFactory applicationModelFactory()
+    {
+        return applicationModelFactory;
+    }
+
+    @Override
+    public ZestAPI api()
+    {
+        return this;
+    }
+
+    @Override
+    public ZestSPI spi()
+    {
+        return this;
+    }
+
+    // API
+
+    @Override
+    @SuppressWarnings( "unchecked" )
+    public <T> T dereference( T composite )
+    {
+        InvocationHandler handler = getInvocationHandler( composite );
+        if( handler instanceof ProxyReferenceInvocationHandler )
+        {
+            return (T) ( (ProxyReferenceInvocationHandler) handler ).proxy();
+        }
+        if( handler instanceof CompositeInstance )
+        {
+            return composite;
+        }
+        return null;
+    }
+
+    @Override
+    public Module moduleOf( Object compositeOrServiceReferenceOrUow )
+    {
+        if( compositeOrServiceReferenceOrUow instanceof TransientComposite )
+        {
+            TransientComposite composite = (TransientComposite) compositeOrServiceReferenceOrUow;
+            return TransientInstance.compositeInstanceOf( composite ).module();
+        }
+        else if( compositeOrServiceReferenceOrUow instanceof EntityComposite )
+        {
+            EntityComposite composite = (EntityComposite) compositeOrServiceReferenceOrUow;
+            return EntityInstance.entityInstanceOf( composite ).module();
+        }
+        else if( compositeOrServiceReferenceOrUow instanceof ValueComposite )
+        {
+            ValueComposite composite = (ValueComposite) compositeOrServiceReferenceOrUow;
+            return ValueInstance.valueInstanceOf( composite ).module();
+        }
+        else if( compositeOrServiceReferenceOrUow instanceof ServiceComposite )
+        {
+            ServiceComposite composite = (ServiceComposite) compositeOrServiceReferenceOrUow;
+            InvocationHandler handler = getInvocationHandler( composite );
+            if( handler instanceof ServiceInstance )
+            {
+                return ( (ServiceInstance) handler ).module();
+            }
+            return ( (ServiceReferenceInstance.ServiceInvocationHandler) handler ).module();
+        }
+        else if( compositeOrServiceReferenceOrUow instanceof UnitOfWork )
+        {
+            ModuleUnitOfWork unitOfWork = (ModuleUnitOfWork) compositeOrServiceReferenceOrUow;
+            return unitOfWork.module();
+        }
+        else if( compositeOrServiceReferenceOrUow instanceof ServiceReferenceInstance )
+        {
+            ServiceReferenceInstance<?> reference = (ServiceReferenceInstance<?>) compositeOrServiceReferenceOrUow;
+            return reference.module();
+        }
+        else if( compositeOrServiceReferenceOrUow instanceof ImportedServiceReferenceInstance )
+        {
+            ImportedServiceReferenceInstance<?> importedServiceReference
+                = (ImportedServiceReferenceInstance<?>) compositeOrServiceReferenceOrUow;
+            return importedServiceReference.module();
+        }
+        throw new IllegalArgumentException( "Wrong type. Must be one of "
+                                            + Arrays.asList( TransientComposite.class, ValueComposite.class,
+                                                             ServiceComposite.class, ServiceReference.class,
+                                                             UnitOfWork.class ) );
+    }
+
+    @Override
+    public ModelDescriptor modelDescriptorFor( Object compositeOrServiceReference )
+    {
+        if( compositeOrServiceReference instanceof TransientComposite )
+        {
+            TransientComposite composite = (TransientComposite) compositeOrServiceReference;
+            return TransientInstance.compositeInstanceOf( composite ).descriptor();
+        }
+        else if( compositeOrServiceReference instanceof EntityComposite )
+        {
+            EntityComposite composite = (EntityComposite) compositeOrServiceReference;
+            return EntityInstance.entityInstanceOf( composite ).descriptor();
+        }
+        else if( compositeOrServiceReference instanceof ValueComposite )
+        {
+            ValueComposite composite = (ValueComposite) compositeOrServiceReference;
+            return ValueInstance.valueInstanceOf( composite ).descriptor();
+        }
+        else if( compositeOrServiceReference instanceof ServiceComposite )
+        {
+            ServiceComposite composite = (ServiceComposite) compositeOrServiceReference;
+            InvocationHandler handler = getInvocationHandler( composite );
+            if( handler instanceof ServiceInstance )
+            {
+                return ( (ServiceInstance) handler ).descriptor();
+            }
+            return ( (ServiceReferenceInstance.ServiceInvocationHandler) handler ).descriptor();
+        }
+        else if( compositeOrServiceReference instanceof ServiceReferenceInstance )
+        {
+            ServiceReferenceInstance<?> reference = (ServiceReferenceInstance<?>) compositeOrServiceReference;
+            return reference.serviceDescriptor();
+        }
+        else if( compositeOrServiceReference instanceof ImportedServiceReferenceInstance )
+        {
+            ImportedServiceReferenceInstance<?> importedServiceReference
+                = (ImportedServiceReferenceInstance<?>) compositeOrServiceReference;
+            return importedServiceReference.serviceDescriptor();
+        }
+        throw new IllegalArgumentException( "Wrong type. Must be one of "
+                                            + Arrays.asList( TransientComposite.class, ValueComposite.class,
+                                                             ServiceComposite.class, ServiceReference.class ) );
+    }
+
+    @Override
+    public CompositeDescriptor compositeDescriptorFor( Object compositeOrServiceReference )
+    {
+        return (CompositeDescriptor) modelDescriptorFor( compositeOrServiceReference );
+    }
+
+    // Descriptors
+
+    @Override
+    public TransientDescriptor transientDescriptorFor( Object transsient )
+    {
+        if( transsient instanceof TransientComposite )
+        {
+            TransientInstance transientInstance = compositeInstanceOf( (Composite) transsient );
+            return (TransientDescriptor) transientInstance.descriptor();
+        }
+        throw new IllegalArgumentException( "Wrong type. Must be subtype of " + TransientComposite.class );
+    }
+
+    @Override
+    public StateHolder stateOf( TransientComposite composite )
+    {
+        return TransientInstance.compositeInstanceOf( composite ).state();
+    }
+
+    @Override
+    public EntityDescriptor entityDescriptorFor( Object entity )
+    {
+        if( entity instanceof EntityComposite )
+        {
+            EntityInstance entityInstance = (EntityInstance) getInvocationHandler( entity );
+            return entityInstance.entityModel();
+        }
+        throw new IllegalArgumentException( "Wrong type. Must be subtype of " + EntityComposite.class );
+    }
+
+    @Override
+    public AssociationStateHolder stateOf( EntityComposite composite )
+    {
+        return EntityInstance.entityInstanceOf( composite ).state();
+    }
+
+    @Override
+    public ValueDescriptor valueDescriptorFor( Object value )
+    {
+        if( value instanceof ValueComposite )
+        {
+            ValueInstance valueInstance = ValueInstance.valueInstanceOf( (ValueComposite) value );
+            return valueInstance.descriptor();
+        }
+        throw new IllegalArgumentException( "Wrong type. Must be subtype of " + ValueComposite.class );
+    }
+
+    @Override
+    public AssociationStateHolder stateOf( ValueComposite composite )
+    {
+        return ValueInstance.valueInstanceOf( composite ).state();
+    }
+
+    @Override
+    public ServiceDescriptor serviceDescriptorFor( Object service )
+    {
+        if( service instanceof ServiceReferenceInstance )
+        {
+            ServiceReferenceInstance<?> ref = (ServiceReferenceInstance<?>) service;
+            return ref.serviceDescriptor();
+        }
+        if( service instanceof ServiceComposite )
+        {
+            ServiceComposite composite = (ServiceComposite) service;
+            return (ServiceDescriptor) ServiceInstance.serviceInstanceOf( composite ).descriptor();
+        }
+        throw new IllegalArgumentException( "Wrong type. Must be subtype of "
+                                            + ServiceComposite.class + " or " + ServiceReference.class );
+    }
+
+    @Override
+    public PropertyDescriptor propertyDescriptorFor( Property<?> property )
+    {
+        while( property instanceof PropertyWrapper )
+        {
+            property = ( (PropertyWrapper) property ).next();
+        }
+
+        return (PropertyDescriptor) ( (PropertyInstance<?>) property ).propertyInfo();
+    }
+
+    @Override
+    public AssociationDescriptor associationDescriptorFor( AbstractAssociation association )
+    {
+        while( association instanceof AssociationWrapper )
+        {
+            association = ( (AssociationWrapper) association ).next();
+        }
+
+        while( association instanceof ManyAssociationWrapper )
+        {
+            association = ( (ManyAssociationWrapper) association ).next();
+        }
+
+        while( association instanceof NamedAssociationWrapper )
+        {
+            association = ( (NamedAssociationWrapper) association ).next();
+        }
+
+        return (AssociationDescriptor) ( (AbstractAssociationInstance) association ).associationInfo();
+    }
+
+    // SPI
+    @Override
+    public EntityState entityStateOf( EntityComposite composite )
+    {
+        return EntityInstance.entityInstanceOf( composite ).entityState();
+    }
+
+    @Override
+    public EntityReference entityReferenceOf( Association assoc )
+    {
+        @SuppressWarnings( "unchecked" )
+        Property<EntityReference> associationState = ( (AssociationInstance) assoc ).getAssociationState();
+        return associationState.get();
+    }
+
+    @Override
+    public Iterable<EntityReference> entityReferenceOf( ManyAssociation assoc )
+    {
+        return ( (ManyAssociationInstance) assoc ).getManyAssociationState();
+    }
+
+    @Override
+    public Iterable<Map.Entry<String, EntityReference>> entityReferenceOf( NamedAssociation assoc )
+    {
+        return ( (NamedAssociationInstance) assoc ).getEntityReferences();
+    }
+}

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/runtime/src/main/java/org/apache/zest/runtime/association/AbstractAssociationInstance.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/association/AbstractAssociationInstance.java b/core/runtime/src/main/java/org/apache/zest/runtime/association/AbstractAssociationInstance.java
index f2ca0a3..7dcfd1c 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/association/AbstractAssociationInstance.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/association/AbstractAssociationInstance.java
@@ -79,7 +79,7 @@ public abstract class AbstractAssociationInstance<T>
         {
             return;
         }
-        throw new IllegalArgumentException( "Object must be a subtype of org.qi4j.api.identity.Identity: " + instance.getClass() );
+        throw new IllegalArgumentException( "Object must be a subtype of org.apache.zest.api.identity.Identity: " + instance.getClass() );
     }
 
     protected void checkImmutable()

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompactLevel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompactLevel.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompactLevel.java
index 42a0dee..a19164c 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompactLevel.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/CompactLevel.java
@@ -26,7 +26,7 @@ package org.apache.zest.runtime.composite;
  * </pre>
  *
  * <p>
- * The Compaction is set through the System Property "<code><b>qi4j.compacttrace</b></code>" to
+ * The Compaction is set through the System Property "<code><b>zest.compacttrace</b></code>" to
  * any of the above values.
  * </p>
  */

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/runtime/src/main/java/org/apache/zest/runtime/composite/FragmentClassLoader.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/FragmentClassLoader.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/FragmentClassLoader.java
index 9835128..91a782a 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/FragmentClassLoader.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/FragmentClassLoader.java
@@ -141,7 +141,7 @@ public class FragmentClassLoader
             }
 //  To Allow JDK classes to be composed.
             if( name.startsWith( "java." ))
-                name = "qi4j." + name;
+                name = "zest." + name;
 
             byte[] b = generateClass( name, baseClass );
             return defineClass( name, b, 0, b.length, baseClass.getProtectionDomain() );
@@ -164,7 +164,7 @@ public class FragmentClassLoader
 
         // Composite reference
         {
-            cw.visitField( ACC_PUBLIC, "_instance", "Lorg/qi4j/api/composite/CompositeInvoker;", null, null ).visitEnd();
+            cw.visitField( ACC_PUBLIC, "_instance", "Lorg/apache/zest/api/composite/CompositeInvoker;", null, null ).visitEnd();
         }
 
         // Static Method references
@@ -235,7 +235,7 @@ public class FragmentClassLoader
                     String[] exceptions = null;
                     {
                         MethodVisitor mv = cw.visitMethod( ACC_PUBLIC, methodName, desc, null, null );
-                        if( isInternalQi4jMethod( method, baseClass ) )
+                        if( isInternalZestMethod( method, baseClass ) )
                         {
                             // generate a NoOp method...
                             mv.visitInsn( RETURN );
@@ -272,7 +272,7 @@ public class FragmentClassLoader
                             mv.visitLabel( l0 );
                             mv.visitVarInsn( ALOAD, 0 );
                             mv.visitFieldInsn( GETFIELD, classSlash, "_instance",
-                                               "Lorg/qi4j/api/composite/CompositeInvoker;" );
+                                               "Lorg/apache/zest/api/composite/CompositeInvoker;" );
                             mv.visitFieldInsn( GETSTATIC, classSlash, "m" + idx, "Ljava/lang/reflect/Method;" );
 
                             int paramCount = method.getParameterTypes().length;
@@ -297,7 +297,7 @@ public class FragmentClassLoader
                             }
 
                             // Call method
-                            mv.visitMethodInsn( INVOKEINTERFACE, "org/qi4j/api/composite/CompositeInvoker",
+                            mv.visitMethodInsn( INVOKEINTERFACE, "org/apache/zest/api/composite/CompositeInvoker",
                                                 "invokeComposite",
                                                 "(Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;", true );
 
@@ -482,7 +482,7 @@ public class FragmentClassLoader
         {
             // if() used for clarity.
             //noinspection RedundantIfStatement
-            if( isInternalQi4jMethod( method, baseClass ) )
+            if( isInternalZestMethod( method, baseClass ) )
             {
                 return false; // Skip methods in Zest-internal interfaces
             }
@@ -497,7 +497,7 @@ public class FragmentClassLoader
         }
     }
 
-    private static boolean isInternalQi4jMethod( Method method, Class baseClass )
+    private static boolean isInternalZestMethod( Method method, Class baseClass )
     {
         return isDeclaredIn( method, Initializable.class, baseClass )
                || isDeclaredIn( method, Lifecycle.class, baseClass );

http://git-wip-us.apache.org/repos/asf/zest-java/blob/95d31c05/core/runtime/src/main/java/org/apache/zest/runtime/composite/FragmentInvocationHandler.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/apache/zest/runtime/composite/FragmentInvocationHandler.java b/core/runtime/src/main/java/org/apache/zest/runtime/composite/FragmentInvocationHandler.java
index 1d4c0e9..2c282a6 100644
--- a/core/runtime/src/main/java/org/apache/zest/runtime/composite/FragmentInvocationHandler.java
+++ b/core/runtime/src/main/java/org/apache/zest/runtime/composite/FragmentInvocationHandler.java
@@ -20,7 +20,7 @@ import java.lang.reflect.Method;
 abstract class FragmentInvocationHandler
     implements InvocationHandler
 {
-    private static final String COMPACT_TRACE = "qi4j.compacttrace";
+    private static final String COMPACT_TRACE = "zest.compacttrace";
 
     private static final CompactLevel compactLevel;
 
@@ -110,7 +110,7 @@ abstract class FragmentInvocationHandler
             return !isJdkInternals( className );
         }
         return !( className.endsWith( FragmentClassLoader.GENERATED_POSTFIX ) ||
-                  className.startsWith( "org.qi4j.runtime" ) ||
+                  className.startsWith( "org.apache.zest.runtime" ) ||
                   isJdkInternals( className ) );
     }
 


Mime
View raw message