brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [13/50] brooklyn-docs git commit: * doc fix: using AbstractApplication instead of ApplicationBuilder * doc fix: using init instead of doBuild
Date Mon, 01 Feb 2016 17:44:02 GMT
* doc fix: using AbstractApplication instead of ApplicationBuilder
* doc fix: using init instead of doBuild


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/commit/ae75ca1b
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/tree/ae75ca1b
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-docs/diff/ae75ca1b

Branch: refs/heads/0.5.0
Commit: ae75ca1be8d64cee3d6e3c69ec1a6eaae4e6e168
Parents: 5e529b1
Author: Peter Veentjer <alarmnummer@gmail.com>
Authored: Tue Apr 2 21:38:31 2013 +0300
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Tue Apr 2 14:21:50 2013 -0700

----------------------------------------------------------------------
 docs/start/walkthrough/index.md                        | 10 ++++++----
 docs/use/examples/global-web-fabric/index.md           | 13 +++++++------
 docs/use/examples/messaging/index.md                   |  5 +++--
 docs/use/examples/portable-cloudfoundry/index.md       |  4 ++--
 docs/use/examples/webcluster/webcluster.include.md     | 11 ++++++-----
 docs/use/examples/whirrhadoop/whirrhadoop.include.md   |  9 +++++----
 docs/use/guide/defining-applications/basic-concepts.md |  2 +-
 .../example_files/tomcat_multi-location.java           |  4 ++--
 .../example_files/tomcat_nginx.java                    |  4 ++--
 .../example_files/tomcat_simple.java                   |  4 ++--
 10 files changed, 36 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ae75ca1b/docs/start/walkthrough/index.md
----------------------------------------------------------------------
diff --git a/docs/start/walkthrough/index.md b/docs/start/walkthrough/index.md
index 3d96234..3e4bb28 100644
--- a/docs/start/walkthrough/index.md
+++ b/docs/start/walkthrough/index.md
@@ -19,8 +19,9 @@ Here's the essential code which creates these and sets them up
 for management:
 
 {% highlight java %}
-public class WebClusterDatabaseExample extends ApplicationBuilder {
-    protected void doBuild() {
+public class WebClusterDatabaseExample extends AbstractApplication {
+    @Override
+    public void init() {
         MySqlNode mysql = addChild(EntitySpecs.spec(MySqlNode.class));
         ControlledDynamicWebAppCluster web = addChild(EntitySpecs.spec(ControlledDynamicWebAppCluster.class));
     }
@@ -75,8 +76,9 @@ block "at the last moment" when the value is needed
 (but after e.g. the VMs have been provisioned, to speed things up).
 
 {% highlight java %}
-public class WebClusterDatabaseExample extends ApplicationBuilder {
-    protected void doBuild() {
+public class WebClusterDatabaseExample extends AbstractApplication {
+    @Override
+    public void init() {
         MySqlNode mysql = addChild(EntitySpecs.spec(MySqlNode.class)
                 .configure(MySqlNode.CREATION_SCRIPT_URL, "classpath://visitors-database-setup.sql"));
         

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ae75ca1b/docs/use/examples/global-web-fabric/index.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/global-web-fabric/index.md b/docs/use/examples/global-web-fabric/index.md
index 43401cb..47e46d1 100644
--- a/docs/use/examples/global-web-fabric/index.md
+++ b/docs/use/examples/global-web-fabric/index.md
@@ -94,17 +94,18 @@ The heavy lifting will be done by off-the-shelf Brooklyn classes:
    and adds them as DNS targets for the region they are in  
 
 First, however, let's create the Java class -- call it `GlobalWebFabricExample`.
-This will extend the Brooklyn `ApplicationBuilder`:
+This will extend the Brooklyn `AbstractApplication`:
 
 {% highlight java %}
 package brooklyn.demo;
 
 import static com.google.common.base.Preconditions.checkNotNull;
-import brooklyn.entity.basic.ApplicationBuilder;
+import brooklyn.entity.basic.AbstractApplication;
 
-public class GlobalWebFabricExample extends ApplicationBuilder {
-    protected void doBuild() {
-        // TODO create our app!
+public class GlobalWebFabricExample extends AbstractApplication {
+    @Override
+    public void init() {
+         // TODO create our app!
     }
 }
 {% endhighlight %}
@@ -223,7 +224,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import brooklyn.config.StringConfigMap;
-import brooklyn.entity.basic.ApplicationBuilder;
+import brooklyn.entity.basic.AbstractApplication;
 import brooklyn.entity.basic.Attributes;
 import brooklyn.entity.dns.geoscaling.GeoscalingDnsService;
 import brooklyn.entity.group.DynamicFabric;

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ae75ca1b/docs/use/examples/messaging/index.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/messaging/index.md b/docs/use/examples/messaging/index.md
index 2944b03..c5b448f 100644
--- a/docs/use/examples/messaging/index.md
+++ b/docs/use/examples/messaging/index.md
@@ -41,8 +41,9 @@ default configuration, specifying only the AMQP port and creates
 no queues or topics:
 
 {% highlight java %}
-public class StandaloneBrokerExample extends ApplicationBuilder {
-    protected void doBuild() {
+public class StandaloneBrokerExample extends AbstractApplication {
+    @Override
+    public void init() {
         // Configure the Qpid broker entity
     	QpidBroker broker = addChild(EntitySpecs.spec(QpidBroker.class)
     	        .configure("amqpPort", 5672));

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ae75ca1b/docs/use/examples/portable-cloudfoundry/index.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/portable-cloudfoundry/index.md b/docs/use/examples/portable-cloudfoundry/index.md
index 31ac0fa..298df32 100644
--- a/docs/use/examples/portable-cloudfoundry/index.md
+++ b/docs/use/examples/portable-cloudfoundry/index.md
@@ -43,12 +43,12 @@ from scratch in a VM-based cloud.
 We'll create our application in a Java class ``MovableCloudFoundryClusterExample``:
 
 {% highlight java %}
-public class MovableCloudFoundryClusterExample extends ApplicationBuilder {
+public class MovableCloudFoundryClusterExample extends AbstractApplication {
 
     public static final String WAR_FILE_URL = "classpath://hello-world-webapp.war";
 
     @Override
-    protected void doBuild() {
+    public void init() {
         // FIXME Code not supported; temporary situation while we update to new mechanism!
         // ElasticJavaWebAppService websvc = new ElasticWebAppService(MutableMap.of("war",
WAR_FILE_URL), getApp());
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ae75ca1b/docs/use/examples/webcluster/webcluster.include.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/webcluster/webcluster.include.md b/docs/use/examples/webcluster/webcluster.include.md
index fec490d..1318514 100644
--- a/docs/use/examples/webcluster/webcluster.include.md
+++ b/docs/use/examples/webcluster/webcluster.include.md
@@ -24,11 +24,11 @@ The simplest of these, ``SingleWebServerExample``, starts JBoss on a single
mach
 with a single line:
 
 {% highlight java %}
-public class SingleWebServerExample extends ApplicationBuilder {
+public class SingleWebServerExample extends AbstractApplication {
     private static final String WAR_PATH = "classpath://hello-world-webapp.war";
 
     @Override
-    protected void doBuild() {
+    public void init() {
         addChild(EntitySpecs.spec(JBoss7Server.class)
                 .configure("war", WAR_PATH)
                 .configure("httpPort", 8080));
@@ -75,7 +75,7 @@ with an Nginx load-balancer set up in front of them, and backed by a MySQL
datab
 The essential code fragment looks like this:
 
 {% highlight java %}
-public class WebClusterDatabaseExample extends ApplicationBuilder {
+public class WebClusterDatabaseExample extends AbstractApplication {
     public static final String WAR_PATH = "classpath://hello-world-sql-webapp.war";
     
     public static final String DB_SETUP_SQL_URL = "classpath://visitors-creation-script.sql";
@@ -83,8 +83,9 @@ public class WebClusterDatabaseExample extends ApplicationBuilder {
     public static final String DB_TABLE = "visitors";
     public static final String DB_USERNAME = "brooklyn";
     public static final String DB_PASSWORD = "br00k11n";
-    
-    protected void doBuild() {
+
+    @Override
+    public void init() {
         MySqlNode mysql = addChild(EntitySpecs.spec(MySqlNode.class)
                 .configure("creationScriptUrl", DB_SETUP_SQL_URL));
         

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ae75ca1b/docs/use/examples/whirrhadoop/whirrhadoop.include.md
----------------------------------------------------------------------
diff --git a/docs/use/examples/whirrhadoop/whirrhadoop.include.md b/docs/use/examples/whirrhadoop/whirrhadoop.include.md
index 63f0682..932299e 100644
--- a/docs/use/examples/whirrhadoop/whirrhadoop.include.md
+++ b/docs/use/examples/whirrhadoop/whirrhadoop.include.md
@@ -32,9 +32,9 @@ The class ``WhirrHadoopExample`` shows how a Hadoop cluster can be started
 with an arbitrary size, using the ``WhirrHadoopCluster`` entity.
 
 {% highlight java %}
-public class WhirrHadoopExample extends ApplicationBuilder {
+public class WhirrHadoopExample extends AbstractApplication {
     @Override
-    protected void doBuild() {
+    public void init() {
         WhirrCluster cluster = addChild(EntitySpecs.spec(WhirrHadoopCluster.class)
                 .configure("size", 2)
                 .configure("memory", 2048));
@@ -65,13 +65,14 @@ The class ``WhirrExample`` shows how an arbitrary [Whirr](http://whirr.apache.or
 can be run from within Brooklyn:
 
 {% highlight java %}
-public class WhirrExample extends ApplicationBuilder {
+public class WhirrExample extends AbstractApplication {
     public static final String RECIPE =
             "whirr.cluster-name=brooklyn-whirr"+"\n"+
             "whirr.hardware-min-ram=1024"+"\n"+
             "whirr.instance-templates=1 noop, 1 elasticsearch"+"\n";
 
-    protected void doBuild() {
+    @Override
+    public void init() {
         WhirrCluster cluster = addChild(EntitySpecs.spec(WhirrCluster.class)
                 .configure("recipe", RECIPE));
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ae75ca1b/docs/use/guide/defining-applications/basic-concepts.md
----------------------------------------------------------------------
diff --git a/docs/use/guide/defining-applications/basic-concepts.md b/docs/use/guide/defining-applications/basic-concepts.md
index ebc3c07..3e9a217 100644
--- a/docs/use/guide/defining-applications/basic-concepts.md
+++ b/docs/use/guide/defining-applications/basic-concepts.md
@@ -39,7 +39,7 @@ Application entities are the top-level entities created and managed externally,
 
 Applications are typically defined in Brooklyn as an ***application descriptor***. 
 This is a Java class specifying the entities which make up the application,
-by extending the class ``ApplicationBuilder``, and specifying how these entities should be
configured and managed.
+by extending the class ``AbstractApplication``, and specifying how these entities should
be configured and managed.
 
 All entities, including applications, can be the parent of other entities. 
 This means that the "child" is typically started, configured, and managed by the parent.

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ae75ca1b/docs/use/guide/defining-applications/example_files/tomcat_multi-location.java
----------------------------------------------------------------------
diff --git a/docs/use/guide/defining-applications/example_files/tomcat_multi-location.java
b/docs/use/guide/defining-applications/example_files/tomcat_multi-location.java
index 90191bd..70d404f 100644
--- a/docs/use/guide/defining-applications/example_files/tomcat_multi-location.java
+++ b/docs/use/guide/defining-applications/example_files/tomcat_multi-location.java
@@ -1,7 +1,7 @@
 // TODO Untested code; see brooklyn-example for better maintained examples!
-public class TomcatFabricApp extends ApplicationBuilder {
+public class TomcatFabricApp extends AbstractApplication {
     @Override
-    protected void doBuild() {
+    public void init() {
         addChild(EntitySpecs.spec(DynamicFabric.class)
                 .configure("displayName", "WebFabric")
                 .configure("displayNamePrefix", "")

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ae75ca1b/docs/use/guide/defining-applications/example_files/tomcat_nginx.java
----------------------------------------------------------------------
diff --git a/docs/use/guide/defining-applications/example_files/tomcat_nginx.java b/docs/use/guide/defining-applications/example_files/tomcat_nginx.java
index 502ee37..cf76516 100644
--- a/docs/use/guide/defining-applications/example_files/tomcat_nginx.java
+++ b/docs/use/guide/defining-applications/example_files/tomcat_nginx.java
@@ -1,7 +1,7 @@
 // TODO Untested code; see brooklyn-example for better maintained examples!
-public class TomcatClusterWithNginxApp extends ApplicationBuilder {
+public class TomcatClusterWithNginxApp extends AbstractApplication {
     @Override
-    protected void doBuild() {
+    public void init() {
         addChild(EntitySpecs.spec(NginxController.class)
                 .configure("domain", "brooklyn.geopaas.org")
                 .configure("port", "8000+")

http://git-wip-us.apache.org/repos/asf/brooklyn-docs/blob/ae75ca1b/docs/use/guide/defining-applications/example_files/tomcat_simple.java
----------------------------------------------------------------------
diff --git a/docs/use/guide/defining-applications/example_files/tomcat_simple.java b/docs/use/guide/defining-applications/example_files/tomcat_simple.java
index 4793b27..4985454 100644
--- a/docs/use/guide/defining-applications/example_files/tomcat_simple.java
+++ b/docs/use/guide/defining-applications/example_files/tomcat_simple.java
@@ -1,7 +1,7 @@
 // TODO Untested code; see brooklyn-example for better maintained examples!
-public class TomcatServerApp extends ApplicationBuilder {
+public class TomcatServerApp extends AbstractApplication {
     @Override
-    protected void doBuild() {
+    public void init() {
         addChild(EntitySpecs.spec(TomcatServer.class)
                 .configure("httpPort", "8080+")
                 .configure("war", "/path/to/booking-mvc.war")));


Mime
View raw message