onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1490403 - in /onami/trunk/configuration/src: main/java/org/apache/onami/configuration/ site/apt/ test/java/org/apache/onami/configuration/
Date Thu, 06 Jun 2013 19:37:57 GMT
Author: simonetripodi
Date: Thu Jun  6 19:37:57 2013
New Revision: 1490403

URL: http://svn.apache.org/r1490403
Log:
ONAMI-34 - rename the Rocoto class

Added:
    onami/trunk/configuration/src/main/java/org/apache/onami/configuration/OnamiVariablesExpander.java
      - copied, changed from r1485693, onami/trunk/configuration/src/main/java/org/apache/onami/configuration/Rocoto.java
Removed:
    onami/trunk/configuration/src/main/java/org/apache/onami/configuration/Rocoto.java
Modified:
    onami/trunk/configuration/src/site/apt/getting-started.apt
    onami/trunk/configuration/src/test/java/org/apache/onami/configuration/ConfigurationModuleTestCase.java

Copied: onami/trunk/configuration/src/main/java/org/apache/onami/configuration/OnamiVariablesExpander.java
(from r1485693, onami/trunk/configuration/src/main/java/org/apache/onami/configuration/Rocoto.java)
URL: http://svn.apache.org/viewvc/onami/trunk/configuration/src/main/java/org/apache/onami/configuration/OnamiVariablesExpander.java?p2=onami/trunk/configuration/src/main/java/org/apache/onami/configuration/OnamiVariablesExpander.java&p1=onami/trunk/configuration/src/main/java/org/apache/onami/configuration/Rocoto.java&r1=1485693&r2=1490403&rev=1490403&view=diff
==============================================================================
--- onami/trunk/configuration/src/main/java/org/apache/onami/configuration/Rocoto.java (original)
+++ onami/trunk/configuration/src/main/java/org/apache/onami/configuration/OnamiVariablesExpander.java
Thu Jun  6 19:37:57 2013
@@ -43,7 +43,7 @@ import com.google.inject.spi.Element;
 /**
  * @since 6.0
  */
-public final class Rocoto
+public final class OnamiVariablesExpander
     extends AbstractModule
 {
 
@@ -78,7 +78,7 @@ public final class Rocoto
      */
     public static Module expandVariables( Parser parser, Iterable<? extends Module>
baseModules )
     {
-        return override( baseModules ).with( new Rocoto( parser, getElements( baseModules
) ) );
+        return override( baseModules ).with( new OnamiVariablesExpander( parser, getElements(
baseModules ) ) );
     }
 
     private final TypeLiteral<String> stringLiteral = new TypeLiteral<String>(){};
@@ -90,7 +90,7 @@ public final class Rocoto
     /**
      * Do nothing, this class cannot be instantiated
      */
-    private Rocoto( Parser parser, List<Element> elements )
+    private OnamiVariablesExpander( Parser parser, List<Element> elements )
     {
         this.parser = parser;
         this.elements = elements;

Modified: onami/trunk/configuration/src/site/apt/getting-started.apt
URL: http://svn.apache.org/viewvc/onami/trunk/configuration/src/site/apt/getting-started.apt?rev=1490403&r1=1490402&r2=1490403&view=diff
==============================================================================
--- onami/trunk/configuration/src/site/apt/getting-started.apt (original)
+++ onami/trunk/configuration/src/site/apt/getting-started.apt Thu Jun  6 19:37:57 2013
@@ -24,25 +24,25 @@
 ~~ under the License.
 ~~
 
-Rocoto getting started
+Apache Onami-Configuration getting started
 
-  The <Rocoto> library is a small <Google Guice> extension that allows expanding
<<<com.google.inject.name.Names>>>
+  The Apache Onami-Configuration library is a small <Google Guice> extension that allows
expanding <<<com.google.inject.name.Names>>>
   variables. That means that users can define properties with placeholders and let <Guice>
resolve them to be injected
   with replaced values.
 
-  Users have just to invoke the <<<org.nnsoft.guice.rocoto.Rocoto.expandVariables>>>
method
+  Users have just to invoke the <<<org.apache.onami.configuration.OnamiVariablesExpander.expandVariables>>>
method
   grouping the <<<Module>>>s where properties have been bound, like in
the sample below:
 
 +--------------------------------------+
+import static org.apache.onami.configuration.OnamiVariablesExpander.expandVariables;
+
 import com.google.inject.Guice;
 import com.google.inject.Injector;
 import com.google.inject.name.Names;
 
-import org.nnsoft.guice.rocoto.Rocoto;
-
 ...
 
-Injector injector = Guice.createInjector( Rocoto.expandVariables( new AbstractModule()
+Injector injector = Guice.createInjector( expandVariables( new AbstractModule()
         {
 
             @Override
@@ -90,7 +90,7 @@ public final class JdbcConfiguration
 
 * $\{\}, the <Apache Ant> variables style
 
-  Rocoto supports the well known <$\{\}> expression to define placeholders, which scope
is the whole
+  Apache Onami-Configuration supports the well known <$\{\}> expression to define placeholders,
which scope is the whole
   configuration, that means that users can define some commons properties in one properties
file:
 
 +--------------------------------------+
@@ -114,7 +114,7 @@ ldap.port=${commons.port}
   {{{http://download.oracle.com/javase/6/docs/api/java/util/Properties.html#getProperty(java.lang.String,
java.lang.String)}Properties#getProperty(java.lang.String, java.lang.String)}}
   method.
 
-  Rocoto allows doing the same, users can specify a key using the pipe character <<<|>>>
to separate the key name from
+  Apache Onami-Configuration allows doing the same, users can specify a key using the pipe
character <<<|>>> to separate the key name from
   the default value:
 
 +--------------------------------------+
@@ -187,5 +187,5 @@ gg=${h}${4|${${2g}2}}
 
   I didn't like that approach at all, it doesn't allow users to split configurations
   in different modules even if some keys are shared by two or more modules.
-  Rocoto users won't have these problems at all,
+  Apache Onami-Configuration users won't have these problems at all,
   they can load <<<*.properties>>> files from different locations and obtain
the same result.

Modified: onami/trunk/configuration/src/test/java/org/apache/onami/configuration/ConfigurationModuleTestCase.java
URL: http://svn.apache.org/viewvc/onami/trunk/configuration/src/test/java/org/apache/onami/configuration/ConfigurationModuleTestCase.java?rev=1490403&r1=1490402&r2=1490403&view=diff
==============================================================================
--- onami/trunk/configuration/src/test/java/org/apache/onami/configuration/ConfigurationModuleTestCase.java
(original)
+++ onami/trunk/configuration/src/test/java/org/apache/onami/configuration/ConfigurationModuleTestCase.java
Thu Jun  6 19:37:57 2013
@@ -19,7 +19,7 @@ package org.apache.onami.configuration;
  * under the License.
  */
 
-import static org.apache.onami.configuration.Rocoto.expandVariables;
+import static org.apache.onami.configuration.OnamiVariablesExpander.expandVariables;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 



Mime
View raw message