archiva-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From och...@apache.org
Subject svn commit: r691867 - in /archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers: archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ archiva-core-consumers/src/main/java/org/apache/maven/archiva/consume...
Date Thu, 04 Sep 2008 04:13:11 GMT
Author: oching
Date: Wed Sep  3 21:13:08 2008
New Revision: 691867

URL: http://svn.apache.org/viewvc?rev=691867&view=rev
Log:
merged -r691527 (MRM-841: changed registry trigger condition for repo-purge, auto-remove,
create-missing-checksums and index-content consumers) 
from trunk

Modified:
    archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
    archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/AutoRemoveConsumer.java
    archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
    archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexContentConsumer.java

Modified: archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java?rev=691867&r1=691866&r2=691867&view=diff
==============================================================================
--- archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
(original)
+++ archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
Wed Sep  3 21:13:08 2008
@@ -19,7 +19,10 @@
  * under the License.
  */
 
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang.StringUtils;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.ConfigurationNames;
 import org.apache.maven.archiva.configuration.FileTypes;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
@@ -94,9 +97,7 @@
     private static final String TYPE_CHECKSUM_CANNOT_CREATE = "checksum-create-failure";
 
     private File repositoryDir;
-
-    private List<String> propertyNameTriggers = new ArrayList<String>();
-
+    
     private List<String> includes = new ArrayList<String>();
 
     public String getId()
@@ -172,8 +173,8 @@
     }
 
     public void afterConfigurationChange( Registry registry, String propertyName, Object
propertyValue )
-    {
-        if ( propertyNameTriggers.contains( propertyName ) )
+    {             
+        if ( ConfigurationNames.isRepositoryScanning( propertyName ) )
         {
             initIncludes();
         }
@@ -194,15 +195,8 @@
     public void initialize()
         throws InitializationException
     {
-        propertyNameTriggers = new ArrayList<String>();
-        propertyNameTriggers.add( "repositoryScanning" );
-        propertyNameTriggers.add( "fileTypes" );
-        propertyNameTriggers.add( "fileType" );
-        propertyNameTriggers.add( "patterns" );
-        propertyNameTriggers.add( "pattern" );
-
         configuration.addChangeListener( this );
-
+        
         initIncludes();
     }
 }

Modified: archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/AutoRemoveConsumer.java
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/AutoRemoveConsumer.java?rev=691867&r1=691866&r2=691867&view=diff
==============================================================================
--- archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/AutoRemoveConsumer.java
(original)
+++ archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/AutoRemoveConsumer.java
Wed Sep  3 21:13:08 2008
@@ -19,7 +19,10 @@
  * under the License.
  */
 
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.commons.lang.StringUtils;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.ConfigurationNames;
 import org.apache.maven.archiva.configuration.FileTypes;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
@@ -69,9 +72,7 @@
     private FileTypes filetypes;
 
     private File repositoryDir;
-
-    private List<String> propertyNameTriggers = new ArrayList<String>();
-
+    
     private List<String> includes = new ArrayList<String>();
 
     public String getId()
@@ -122,8 +123,8 @@
     }
 
     public void afterConfigurationChange( Registry registry, String propertyName, Object
propertyValue )
-    {
-        if ( propertyNameTriggers.contains( propertyName ) )
+    {                
+        if ( ConfigurationNames.isRepositoryScanning( propertyName ) )
         {
             initIncludes();
         }
@@ -143,14 +144,7 @@
 
     public void initialize()
         throws InitializationException
-    {
-        propertyNameTriggers = new ArrayList<String>();
-        propertyNameTriggers.add( "repositoryScanning" );
-        propertyNameTriggers.add( "fileTypes" );
-        propertyNameTriggers.add( "fileType" );
-        propertyNameTriggers.add( "patterns" );
-        propertyNameTriggers.add( "pattern" );
-
+    {     
         configuration.addChangeListener( this );
 
         initIncludes();

Modified: archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java?rev=691867&r1=691866&r2=691867&view=diff
==============================================================================
--- archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
(original)
+++ archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/maven/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
Wed Sep  3 21:13:08 2008
@@ -20,6 +20,7 @@
  */
 
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.ConfigurationNames;
 import org.apache.maven.archiva.configuration.FileTypes;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
@@ -198,7 +199,7 @@
 
     public void afterConfigurationChange( Registry registry, String propertyName, Object
propertyValue )
     {
-        if ( propertyNameTriggers.contains( propertyName ) )
+        if ( ConfigurationNames.isRepositoryScanning( propertyName ) )
         {
             initIncludes();
         }
@@ -219,13 +220,6 @@
     public void initialize()
         throws InitializationException
     {
-        propertyNameTriggers = new ArrayList<String>();
-        propertyNameTriggers.add( "repositoryScanning" );
-        propertyNameTriggers.add( "fileTypes" );
-        propertyNameTriggers.add( "fileType" );
-        propertyNameTriggers.add( "patterns" );
-        propertyNameTriggers.add( "pattern" );
-
         configuration.addChangeListener( this );
 
         initIncludes();

Modified: archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexContentConsumer.java
URL: http://svn.apache.org/viewvc/archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexContentConsumer.java?rev=691867&r1=691866&r2=691867&view=diff
==============================================================================
--- archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexContentConsumer.java
(original)
+++ archiva/branches/archiva-1.1.x/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/maven/archiva/consumers/lucene/IndexContentConsumer.java
Wed Sep  3 21:13:08 2008
@@ -21,6 +21,7 @@
 
 import org.apache.commons.io.FileUtils;
 import org.apache.maven.archiva.configuration.ArchivaConfiguration;
+import org.apache.maven.archiva.configuration.ConfigurationNames;
 import org.apache.maven.archiva.configuration.FileTypes;
 import org.apache.maven.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.maven.archiva.consumers.AbstractMonitoredConsumer;
@@ -98,9 +99,7 @@
      * @plexus.requirement role-hint="lucene"
      */
     private RepositoryContentIndexFactory indexFactory;
-
-    private List<String> propertyNameTriggers = new ArrayList<String>();
-
+    
     private List<String> includes = new ArrayList<String>();
 
     private RepositoryContentIndex index;
@@ -198,7 +197,7 @@
 
     public void afterConfigurationChange( Registry registry, String propertyName, Object
propertyValue )
     {
-        if ( propertyNameTriggers.contains( propertyName ) )
+        if ( ConfigurationNames.isRepositoryScanning( propertyName ) )
         {
             initIncludes();
         }
@@ -219,13 +218,6 @@
     public void initialize()
         throws InitializationException
     {
-        propertyNameTriggers = new ArrayList<String>();
-        propertyNameTriggers.add( "repositoryScanning" );
-        propertyNameTriggers.add( "fileTypes" );
-        propertyNameTriggers.add( "fileType" );
-        propertyNameTriggers.add( "patterns" );
-        propertyNameTriggers.add( "pattern" );
-
         configuration.addChangeListener( this );
 
         initIncludes();



Mime
View raw message