archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1430181 - /archiva/redback/redback-components/trunk/spring-registry/spring-registry-commons/src/main/java/org/apache/archiva/redback/components/registry/commons/CommonsConfigurationRegistry.java
Date Tue, 08 Jan 2013 08:57:19 GMT
Author: olamy
Date: Tue Jan  8 08:57:19 2013
New Revision: 1430181

URL: http://svn.apache.org/viewvc?rev=1430181&view=rev
Log:
make propertyDelimiter configurable

Modified:
    archiva/redback/redback-components/trunk/spring-registry/spring-registry-commons/src/main/java/org/apache/archiva/redback/components/registry/commons/CommonsConfigurationRegistry.java

Modified: archiva/redback/redback-components/trunk/spring-registry/spring-registry-commons/src/main/java/org/apache/archiva/redback/components/registry/commons/CommonsConfigurationRegistry.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-components/trunk/spring-registry/spring-registry-commons/src/main/java/org/apache/archiva/redback/components/registry/commons/CommonsConfigurationRegistry.java?rev=1430181&r1=1430180&r2=1430181&view=diff
==============================================================================
--- archiva/redback/redback-components/trunk/spring-registry/spring-registry-commons/src/main/java/org/apache/archiva/redback/components/registry/commons/CommonsConfigurationRegistry.java
(original)
+++ archiva/redback/redback-components/trunk/spring-registry/spring-registry-commons/src/main/java/org/apache/archiva/redback/components/registry/commons/CommonsConfigurationRegistry.java
Tue Jan  8 08:57:19 2013
@@ -73,6 +73,8 @@ public class CommonsConfigurationRegistr
 
     private Logger logger = LoggerFactory.getLogger( getClass() );
 
+    private String propertyDelimiter = "@@";
+
     /**
      * The configuration properties for the registry. This should take the format of an input
to the Commons
      * Configuration
@@ -375,7 +377,7 @@ public class CommonsConfigurationRegistr
                 {
                     DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
                     DefaultExpressionEngine expressionEngine = new DefaultExpressionEngine();
-                    expressionEngine.setPropertyDelimiter( "@@" );
+                    expressionEngine.setPropertyDelimiter( propertyDelimiter );
                     builder.setExpressionEngine( expressionEngine );
 
                     StringSearchInterpolator interpolator = new StringSearchInterpolator(
"${", "}" );
@@ -420,4 +422,14 @@ public class CommonsConfigurationRegistr
         Configuration configuration = combinedConfiguration.getConfiguration( name );
         return configuration == null ? null : new CommonsConfigurationRegistry( configuration
);
     }
+
+    public String getPropertyDelimiter()
+    {
+        return propertyDelimiter;
+    }
+
+    public void setPropertyDelimiter( String propertyDelimiter )
+    {
+        this.propertyDelimiter = propertyDelimiter;
+    }
 }



Mime
View raw message