[jboss-cvs] JBossAS SVN: r87122 - in projects/bootstrap/trunk: spi/src/main/java/org/jboss/bootstrap/spi/config and 3 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Apr 10 07:33:17 EDT 2009


Author: ALRubinger
Date: 2009-04-10 07:33:17 -0400 (Fri, 10 Apr 2009)
New Revision: 87122

Modified:
   projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/server/unit/MCServerUnitTestCase.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/AbstractBasicServerConfig.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ServerConfig.java
   projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/AbstractBasicServerInitializer.java
   projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/TestConfigFactory.java
   projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/unit/ConfigInitializationTestCase.java
   projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/unit/ConfigValidationTestCase.java
Log:
[JBBOOT-28] Change ServerConfig API to use Fowler-suggested short syntax in method chaining

Modified: projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/server/unit/MCServerUnitTestCase.java
===================================================================
--- projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/server/unit/MCServerUnitTestCase.java	2009-04-10 11:09:01 UTC (rev 87121)
+++ projects/bootstrap/trunk/impl-mc/src/test/java/org/jboss/bootstrap/impl/mc/server/unit/MCServerUnitTestCase.java	2009-04-10 11:33:17 UTC (rev 87122)
@@ -177,7 +177,7 @@
       }
 
       // Populate and return
-      return new BasicMCServerConfig().setBootstrapHome(home).setBootstrapConfLocation(conf).setBootstrapUrl(bootstrap)
-            .setBootstrapName(NAME_BOOTSTRAP);
+      return new BasicMCServerConfig().bootstrapHome(home).bootstrapConfLocation(conf).bootstrapUrl(bootstrap)
+            .bootstrapName(NAME_BOOTSTRAP);
    }
 }

Modified: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/AbstractBasicServerConfig.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/AbstractBasicServerConfig.java	2009-04-10 11:09:01 UTC (rev 87121)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/AbstractBasicServerConfig.java	2009-04-10 11:33:17 UTC (rev 87122)
@@ -223,7 +223,7 @@
    /* (non-Javadoc)
     * @see org.jboss.bootstrap.spi.config.ServerConfig#setBootstrapConfLocation(java.net.URL)
     */
-   public synchronized T setBootstrapConfLocation(final URL confLocation) throws IllegalArgumentException
+   public synchronized T bootstrapConfLocation(final URL confLocation) throws IllegalArgumentException
    {
       // Precondition check
       this.checkMutable();
@@ -241,7 +241,7 @@
    /* (non-Javadoc)
     * @see org.jboss.bootstrap.spi.config.ServerConfig#setBootstrapHome(java.net.URL)
     */
-   public synchronized T setBootstrapHome(final URL bootstrapHome) throws IllegalArgumentException
+   public synchronized T bootstrapHome(final URL bootstrapHome) throws IllegalArgumentException
    {
       // Precondition check
       this.checkMutable();
@@ -259,7 +259,7 @@
    /* (non-Javadoc)
     * @see org.jboss.bootstrap.spi.config.ServerConfig#setBootstrapName(java.lang.String)
     */
-   public synchronized T setBootstrapName(final String name) throws IllegalArgumentException
+   public synchronized T bootstrapName(final String name) throws IllegalArgumentException
    {
       // Precondition check
       this.checkMutable();
@@ -277,7 +277,7 @@
    /* (non-Javadoc)
     * @see org.jboss.bootstrap.spi.config.ServerConfig#setBootstrapUrl(java.net.URL)
     */
-   public synchronized T setBootstrapUrl(final URL bootstrapLocation) throws IllegalArgumentException
+   public synchronized T bootstrapUrl(final URL bootstrapLocation) throws IllegalArgumentException
    {
       // Precondition check
       this.checkMutable();
@@ -295,7 +295,7 @@
    /* (non-Javadoc)
     * @see org.jboss.bootstrap.spi.config.ServerConfig#setProperty(java.lang.String, java.lang.String)
     */
-   public T setProperty(final String key, final String value) throws IllegalArgumentException
+   public T property(final String key, final String value) throws IllegalArgumentException
    {
       // Precondition check
       this.checkMutable();

Modified: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ServerConfig.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ServerConfig.java	2009-04-10 11:09:01 UTC (rev 87121)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/config/ServerConfig.java	2009-04-10 11:33:17 UTC (rev 87122)
@@ -81,7 +81,7 @@
     * @throws IllegalArgumentException If the bootstrap home location was not specified
     * @throws IllegalStateException If the configuration has been frozen
     */
-   T setBootstrapHome(URL bootstrapHome) throws IllegalArgumentException, IllegalStateException;
+   T bootstrapHome(URL bootstrapHome) throws IllegalArgumentException, IllegalStateException;
 
    /**
     * Obtains the location of the bootstrap file.  This will mirror the 
@@ -100,7 +100,7 @@
     * @throws IllegalArgumentException If the location was not specified
     * @throws IllegalStateException If the configuration has been frozen
     */
-   T setBootstrapUrl(URL bootstrapLocation) throws IllegalArgumentException, IllegalStateException;
+   T bootstrapUrl(URL bootstrapLocation) throws IllegalArgumentException, IllegalStateException;
 
    /**
     * Obtains the name of the bootstrap configuration.  This will
@@ -119,7 +119,7 @@
     * @throws IllegalArgumentException If the name was not specified
     * @throws IllegalStateException If the configuration has been frozen
     */
-   T setBootstrapName(String name) throws IllegalArgumentException, IllegalStateException;
+   T bootstrapName(String name) throws IllegalArgumentException, IllegalStateException;
 
    /**
     * Obtains the location of the bootstrap configuration location.  This will mirror the 
@@ -138,7 +138,7 @@
     * @throws IllegalArgumentException If the location was not specified
     * @throws IllegalStateException If the configuration has been frozen
     */
-   T setBootstrapConfLocation(URL confLocation) throws IllegalArgumentException, IllegalStateException;
+   T bootstrapConfLocation(URL confLocation) throws IllegalArgumentException, IllegalStateException;
 
    /**
     * Returns an immutable copy of the properties used in configuring the server
@@ -156,7 +156,7 @@
     * @throws IllegalArgumentException If the key was not supplied
     * @throws IllegalStateException If the configuration has been frozen
     */
-   T setProperty(String key, String value) throws IllegalArgumentException, IllegalStateException;
+   T property(String key, String value) throws IllegalArgumentException, IllegalStateException;
 
    /**
     * Freezes the configuration, marking it as immutable.  Will typically 

Modified: projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/AbstractBasicServerInitializer.java
===================================================================
--- projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/AbstractBasicServerInitializer.java	2009-04-10 11:09:01 UTC (rev 87121)
+++ projects/bootstrap/trunk/spi/src/main/java/org/jboss/bootstrap/spi/server/AbstractBasicServerInitializer.java	2009-04-10 11:33:17 UTC (rev 87122)
@@ -120,7 +120,7 @@
          log.debug("New bootstrap URL: " + newBootstrapUrl.toExternalForm());
 
          // Set
-         config.setBootstrapUrl(newBootstrapUrl);
+         config.bootstrapUrl(newBootstrapUrl);
       }
 
       /*
@@ -165,7 +165,7 @@
          // Set
          if (newConf != null)
          {
-            config.setBootstrapConfLocation(newConf);
+            config.bootstrapConfLocation(newConf);
          }
       }
 

Modified: projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/TestConfigFactory.java
===================================================================
--- projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/TestConfigFactory.java	2009-04-10 11:09:01 UTC (rev 87121)
+++ projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/TestConfigFactory.java	2009-04-10 11:33:17 UTC (rev 87122)
@@ -81,7 +81,7 @@
       }
 
       // Populate and return
-      return config.setBootstrapHome(home).setBootstrapConfLocation(conf).setBootstrapUrl(bootstrap).setBootstrapName(
+      return config.bootstrapHome(home).bootstrapConfLocation(conf).bootstrapUrl(bootstrap).bootstrapName(
             NAME_BOOTSTRAP);
    }
 

Modified: projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/unit/ConfigInitializationTestCase.java
===================================================================
--- projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/unit/ConfigInitializationTestCase.java	2009-04-10 11:09:01 UTC (rev 87121)
+++ projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/unit/ConfigInitializationTestCase.java	2009-04-10 11:33:17 UTC (rev 87122)
@@ -107,7 +107,7 @@
       final TestNoOpServer server = this.server;
 
       // Remove conf and set on server
-      configuration.setBootstrapConfLocation(null);
+      configuration.bootstrapConfLocation(null);
       server.setConfiguration(configuration);
 
       // Initialize
@@ -138,7 +138,7 @@
       final TestNoOpServer server = this.server;
 
       // Remove conf and home
-      configuration.setBootstrapHome(null).setBootstrapConfLocation(null);
+      configuration.bootstrapHome(null).bootstrapConfLocation(null);
       server.setConfiguration(configuration);
 
       // Initialize
@@ -169,7 +169,7 @@
       final TestNoOpServer server = this.server;
 
       // Remove bootstrapURL
-      configuration.setBootstrapUrl(null);
+      configuration.bootstrapUrl(null);
       server.setConfiguration(configuration);
 
       // Initialize

Modified: projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/unit/ConfigValidationTestCase.java
===================================================================
--- projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/unit/ConfigValidationTestCase.java	2009-04-10 11:09:01 UTC (rev 87121)
+++ projects/bootstrap/trunk/spi/src/test/java/org/jboss/bootstrap/spi/config/unit/ConfigValidationTestCase.java	2009-04-10 11:33:17 UTC (rev 87122)
@@ -126,7 +126,7 @@
       final TestServerConfig configuration = TestConfigFactory.createConfiguration();
 
       // Remove home and name
-      configuration.setBootstrapHome(null).setBootstrapName(null);
+      configuration.bootstrapHome(null).bootstrapName(null);
 
       // Validate
       try
@@ -158,7 +158,7 @@
       final TestServerConfig configuration = TestConfigFactory.createConfiguration();
 
       // Remove home, name, bootstrapURL
-      configuration.setBootstrapHome(null).setBootstrapName(null).setBootstrapUrl(null);
+      configuration.bootstrapHome(null).bootstrapName(null).bootstrapUrl(null);
 
       // Validate
       boolean validationFailed = false;




More information about the jboss-cvs-commits mailing list