Repository: zest-java Updated Branches: refs/heads/support/2.1 3f0633de7 -> 410322045
ZEST-125 bootstrap/layered: add ApplicationDescriptor accessor Cherry-picked from 30a00d33f6e295fe393bc0c2180a999c1dba905f Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/41032204 Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/41032204 Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/41032204 Branch: refs/heads/support/2.1 Commit: 410322045667e264e9f16bcce78c55a71c63a090 Parents: 3f0633d Author: Paul Merlin <[email protected]> Authored: Tue Sep 29 17:47:41 2015 +0200 Committer: Paul Merlin <[email protected]> Committed: Tue Sep 29 17:52:38 2015 +0200 ---------------------------------------------------------------------- .../layered/LayeredApplicationAssembler.java | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/zest-java/blob/41032204/core/bootstrap/src/main/java/org/qi4j/bootstrap/layered/LayeredApplicationAssembler.java ---------------------------------------------------------------------- diff --git a/core/bootstrap/src/main/java/org/qi4j/bootstrap/layered/LayeredApplicationAssembler.java b/core/bootstrap/src/main/java/org/qi4j/bootstrap/layered/LayeredApplicationAssembler.java index 39d3bcf..bf8dc16 100644 --- a/core/bootstrap/src/main/java/org/qi4j/bootstrap/layered/LayeredApplicationAssembler.java +++ b/core/bootstrap/src/main/java/org/qi4j/bootstrap/layered/LayeredApplicationAssembler.java @@ -46,6 +46,7 @@ public abstract class LayeredApplicationAssembler private final HashMap<Class<? extends LayerAssembler>, LayerAssembler> assemblers = new HashMap<>(); private ApplicationAssembly assembly; + protected ApplicationDescriptor model; protected Application application; public LayeredApplicationAssembler( String name, String version, Application.Mode mode ) @@ -60,7 +61,7 @@ public abstract class LayeredApplicationAssembler public void initialize() throws AssemblyException { - ApplicationDescriptor model = zest.newApplicationModel( this ); + model = zest.newApplicationModel( this ); onModelCreated( model ); instantiateApplication( zest, model ); } @@ -71,8 +72,8 @@ public abstract class LayeredApplicationAssembler } /** - * This method is called from the constructor to instantiate the Zest application from the application model. - * + * This method is called from the <code>initialize</code> method to instantiate the Zest application from the + * application model. * <p> * The default implementation simply calls; * </p> @@ -104,6 +105,11 @@ public abstract class LayeredApplicationAssembler { } + public ApplicationDescriptor model() + { + return model; + } + public Application application() { return application; @@ -274,10 +280,10 @@ public abstract class LayeredApplicationAssembler } /** - * Called from the constructor to assemble the layers in the applcation. + * Called from the <code>assemble</code> method to assemble the layers in the applcation. * * <p> - * This method must be implemented, and is typically a list of LayerAssmebler instantitations, followed + * This method must be implemented, and is typically a list of LayerAssembler instantitations, followed * by {@link LayerAssembly#uses(LayerAssembly...)} declarations. * </p> * <pre><code>
