polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From paulmer...@apache.org
Subject zest-java git commit: ZEST-125 bootstrap/layered: add ApplicationDescriptor accessor
Date Tue, 29 Sep 2015 15:47:41 GMT
Repository: zest-java
Updated Branches:
  refs/heads/develop 7d1eccbfd -> 30a00d33f


ZEST-125 bootstrap/layered: add ApplicationDescriptor accessor


Project: http://git-wip-us.apache.org/repos/asf/zest-java/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-java/commit/30a00d33
Tree: http://git-wip-us.apache.org/repos/asf/zest-java/tree/30a00d33
Diff: http://git-wip-us.apache.org/repos/asf/zest-java/diff/30a00d33

Branch: refs/heads/develop
Commit: 30a00d33f6e295fe393bc0c2180a999c1dba905f
Parents: 7d1eccb
Author: Paul Merlin <paulmerlin@apache.org>
Authored: Tue Sep 29 17:47:41 2015 +0200
Committer: Paul Merlin <paulmerlin@apache.org>
Committed: Tue Sep 29 17:47:41 2015 +0200

----------------------------------------------------------------------
 .../layered/LayeredApplicationAssembler.java         | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-java/blob/30a00d33/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 536a239..0c5ccde 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
@@ -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,7 +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;
@@ -104,6 +106,11 @@ public abstract class LayeredApplicationAssembler
     {
     }
 
+    public ApplicationDescriptor model()
+    {
+        return model;
+    }
+
     public Application application()
     {
         return application;
@@ -274,10 +281,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>


Mime
View raw message