archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ol...@apache.org
Subject svn commit: r1556422 - in /archiva/redback/redback-core/trunk: redback-common/redback-common-jdo/src/main/java/org/apache/archiva/redback/common/jdo/ redback-common/redback-common-jdo/src/main/resources/META-INF/ redback-data-management/src/test/resour...
Date Wed, 08 Jan 2014 01:34:57 GMT
Author: olamy
Date: Wed Jan  8 01:34:57 2014
New Revision: 1556422

URL: http://svn.apache.org/r1556422
Log:
use a better name for this field

Modified:
    archiva/redback/redback-core/trunk/redback-common/redback-common-jdo/src/main/java/org/apache/archiva/redback/common/jdo/UserConfigurableJdoFactory.java
    archiva/redback/redback-core/trunk/redback-common/redback-common-jdo/src/main/resources/META-INF/spring-context.xml
    archiva/redback/redback-core/trunk/redback-data-management/src/test/resources/spring-context.xml
    archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/src/test/resources/spring-context.xml

Modified: archiva/redback/redback-core/trunk/redback-common/redback-common-jdo/src/main/java/org/apache/archiva/redback/common/jdo/UserConfigurableJdoFactory.java
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-common/redback-common-jdo/src/main/java/org/apache/archiva/redback/common/jdo/UserConfigurableJdoFactory.java?rev=1556422&r1=1556421&r2=1556422&view=diff
==============================================================================
--- archiva/redback/redback-core/trunk/redback-common/redback-common-jdo/src/main/java/org/apache/archiva/redback/common/jdo/UserConfigurableJdoFactory.java
(original)
+++ archiva/redback/redback-core/trunk/redback-common/redback-common-jdo/src/main/java/org/apache/archiva/redback/common/jdo/UserConfigurableJdoFactory.java
Wed Jan  8 01:34:57 2014
@@ -37,34 +37,38 @@ import javax.inject.Named;
  * UserConfigurableJdoFactory
  *
  * @author <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>
- *
  */
-@Service( "jdoFactory#users" )
+@Service("jdoFactory#users")
 public class UserConfigurableJdoFactory
     extends DefaultConfigurableJdoFactory
 {
 
     private Logger log = LoggerFactory.getLogger( getClass() );
 
+    private UserConfiguration userConfiguration;
+
     @Inject
-    @Named( value = "userConfiguration#default" )
-    private UserConfiguration config;
+    public UserConfigurableJdoFactory(
+        @Named( value = "userConfiguration#default" ) UserConfiguration userConfiguration
)
+    {
+        this.userConfiguration = userConfiguration;
+    }
 
     private String getConfigString( String key, String currentValue, String defaultValue
)
     {
         String valueFromSysProps = System.getProperty( "redback." + key );
-        if (StringUtils.isNotEmpty( valueFromSysProps ))
+        if ( StringUtils.isNotEmpty( valueFromSysProps ) )
         {
             return valueFromSysProps;
         }
         String value = null;
         if ( StringUtils.isNotEmpty( currentValue ) )
         {
-            value = config.getString( key, currentValue );
+            value = userConfiguration.getString( key, currentValue );
         }
         else
         {
-            value = config.getString( key, defaultValue );
+            value = userConfiguration.getString( key, defaultValue );
         }
         // do some interpolation as we can have some ${plexus.home} etc...
         StringSearchInterpolator interpolator = new StringSearchInterpolator();
@@ -116,13 +120,13 @@ public class UserConfigurableJdoFactory
         super.initialize();
     }
 
-    public UserConfiguration getConfig()
+    public UserConfiguration getUserConfiguration()
     {
-        return config;
+        return userConfiguration;
     }
 
-    public void setConfig( UserConfiguration config )
+    public void setUserConfiguration( UserConfiguration userConfiguration )
     {
-        this.config = config;
+        this.userConfiguration = userConfiguration;
     }
 }

Modified: archiva/redback/redback-core/trunk/redback-common/redback-common-jdo/src/main/resources/META-INF/spring-context.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-common/redback-common-jdo/src/main/resources/META-INF/spring-context.xml?rev=1556422&r1=1556421&r2=1556422&view=diff
==============================================================================
--- archiva/redback/redback-core/trunk/redback-common/redback-common-jdo/src/main/resources/META-INF/spring-context.xml
(original)
+++ archiva/redback/redback-core/trunk/redback-common/redback-common-jdo/src/main/resources/META-INF/spring-context.xml
Wed Jan  8 01:34:57 2014
@@ -25,6 +25,11 @@
         default-lazy-init="true">
 
   <bean name="jdoFactory#users" class="org.apache.archiva.redback.common.jdo.UserConfigurableJdoFactory">
+    <constructor-arg>
+      <ref bean="userConfiguration#default"/>
+    </constructor-arg>
+    <!--
     <property name="config" ref="userConfiguration#default"/>
+    -->
   </bean>
 </beans>
\ No newline at end of file

Modified: archiva/redback/redback-core/trunk/redback-data-management/src/test/resources/spring-context.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-data-management/src/test/resources/spring-context.xml?rev=1556422&r1=1556421&r2=1556422&view=diff
==============================================================================
--- archiva/redback/redback-core/trunk/redback-data-management/src/test/resources/spring-context.xml
(original)
+++ archiva/redback/redback-core/trunk/redback-data-management/src/test/resources/spring-context.xml
Wed Jan  8 01:34:57 2014
@@ -29,7 +29,12 @@
   <context:property-placeholder system-properties-mode="OVERRIDE"/>
 
   <bean name="jdoFactory#users" class="org.apache.archiva.redback.common.jdo.UserConfigurableJdoFactory">
+    <constructor-arg>
+      <ref bean="userConfiguration#default"/>
+    </constructor-arg>
+    <!--
     <property name="config" ref="userConfiguration#default"/>
+    -->
     <!--
     <property name="driverName" value="org.apache.derby.jdbc.EmbeddedDriver"/>
     <property name="url" value="jdbc:derby:memory:users-test" />

Modified: archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/src/test/resources/spring-context.xml
URL: http://svn.apache.org/viewvc/archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/src/test/resources/spring-context.xml?rev=1556422&r1=1556421&r2=1556422&view=diff
==============================================================================
--- archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/src/test/resources/spring-context.xml
(original)
+++ archiva/redback/redback-core/trunk/redback-users/redback-users-providers/redback-users-jdo/src/test/resources/spring-context.xml
Wed Jan  8 01:34:57 2014
@@ -27,7 +27,10 @@
            http://www.springframework.org/schema/context/spring-context-3.0.xsd">
 
   <bean name="jdoFactory#users" class="org.apache.archiva.redback.common.jdo.UserConfigurableJdoFactory">
-    <property name="config" ref="userConfiguration#default"/>
+    <constructor-arg>
+      <ref bean="userConfiguration#default"/>
+    </constructor-arg>
+    <!--property name="userConfiguration" ref="userConfiguration#default"/-->
     <property name="driverName" value="org.hsqldb.jdbcDriver"/>
     <property name="url" value="jdbc:hsqldb:mem:redback-users-tests" />
     <property name="userName" value="sa"/>



Mime
View raw message