]> source.dussan.org Git - archiva.git/commitdiff
MRM-1865 remove isPermanent flag
authorEric Barboni <skygo@apache.org>
Fri, 10 Oct 2014 20:41:59 +0000 (22:41 +0200)
committerEric Barboni <skygo@apache.org>
Fri, 10 Oct 2014 20:41:59 +0000 (22:41 +0200)
19 files changed:
archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/Consumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/PermanentConsumerPredicate.java [deleted file]
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java
archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java
archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java
archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/SampleKnownConsumer.java
archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java
archiva-modules/archiva-web/archiva-test-mocks/src/main/java/org/apache/archiva/web/mocks/MockInvalidRepositoryContentConsumer.java
archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java

index 6ac24d5ce03a697201e888978a2420e86f85f785..583add4f79a6ef1763292613c1ef5e0d99f406c6 100644 (file)
@@ -79,12 +79,6 @@ public class ArtifactCountConsumer
         return id;
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     @Override
     public List<String> getExcludes()
     {
index 103f85a63e320df0c129d512628fa8bd61e6284b..b393ec3c3c3765ee2db2f47815c197dd2833a610 100644 (file)
@@ -40,13 +40,6 @@ public abstract interface Consumer
      */
     String getDescription();
     
-    /**
-     * Flag indicating permanance of consumer. (if it can be disabled or not)
-     * 
-     * @return true indicating that consumer is permanent and cannot be disabled. 
-     */
-    boolean isPermanent();
-
     /**
      * Add a consumer monitor to the consumer.
      * 
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/PermanentConsumerPredicate.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/PermanentConsumerPredicate.java
deleted file mode 100644 (file)
index af76c45..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-package org.apache.archiva.consumers.functors;
-
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-import org.apache.commons.collections.Predicate;
-import org.apache.archiva.consumers.Consumer;
-
-/**
- * Selects Consumers that are flaged as 'permanent'. 
- *
- *
- */
-public class PermanentConsumerPredicate
-    implements Predicate
-{
-
-    @Override
-    public boolean evaluate( Object object )
-    {
-        boolean satisfies = false;
-
-        if ( object instanceof Consumer )
-        {
-            Consumer consumer = (Consumer) object;
-            satisfies = consumer.isPermanent();
-        }
-
-        return satisfies;
-    }
-
-}
index e04d744220eb09f8d98205bc1c4f50e88558e3ab..70fb11933c9c159b0385ebfaf1302f1407e951a9 100644 (file)
@@ -23,13 +23,10 @@ import org.apache.archiva.admin.model.beans.ManagedRepository;
 import org.apache.archiva.checksum.ChecksumAlgorithm;
 import org.apache.archiva.checksum.ChecksummedFile;
 import org.apache.archiva.configuration.ArchivaConfiguration;
-import org.apache.archiva.configuration.ConfigurationNames;
 import org.apache.archiva.configuration.FileTypes;
 import org.apache.archiva.consumers.AbstractMonitoredConsumer;
 import org.apache.archiva.consumers.ConsumerException;
 import org.apache.archiva.consumers.KnownRepositoryContentConsumer;
-import org.apache.archiva.redback.components.registry.Registry;
-import org.apache.archiva.redback.components.registry.RegistryListener;
 import org.springframework.context.annotation.Scope;
 import org.springframework.stereotype.Service;
 import org.slf4j.Logger;
@@ -101,13 +98,7 @@ public class ArtifactMissingChecksumsConsumer
     {
         return this.description;
     }
-
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
+    
     @Override
     public void beginScan( ManagedRepository repo, Date whenGathered )
         throws ConsumerException
index 3c9c7507c55f60beb506a518136ed0b3dd966456..b323e019072bac4e689cb35d2567d3ca19007c5c 100644 (file)
@@ -92,12 +92,6 @@ public class AutoRemoveConsumer
         return this.description;
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     @Override
     public void beginScan( ManagedRepository repository, Date whenGathered )
         throws ConsumerException
index d42cbcff7175b1708770f5a6c836d99a0ce3eb03..9445bc98e5967dcee2ee5b83dc7ecc4dc13ddc50 100644 (file)
@@ -86,12 +86,6 @@ public class AutoRenameConsumer
         return this.description;
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     @Override
     public void beginScan( ManagedRepository repository, Date whenGathered )
         throws ConsumerException
index 2f2ca6d296571cdd54d8f336faf60636f83810dd..fe158db9f82d3f64e4fd3a0cf859e9c2aef40edd 100644 (file)
@@ -296,12 +296,6 @@ public class MetadataUpdaterConsumer
         }
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     /*
     @Override
     public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
index 35e8bd5f960d36e66778f69a59d099b2475333a6..4f7de375548ef4e831b02a4db47403f402a4a9ab 100644 (file)
@@ -94,12 +94,6 @@ public class ValidateChecksumConsumer
         return this.description;
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     @Override
     public void beginScan( ManagedRepository repository, Date whenGathered )
         throws ConsumerException
index 53c6f12c55e0ee8105b65e833564cc1ee306d2c4..41e4761f948a0f0c0b0e6c0aa64dc64f12143272 100644 (file)
@@ -122,12 +122,6 @@ public class RepositoryPurgeConsumer
         return this.description;
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     @Override
     public List<String> getExcludes()
     {
index 4e6df8cdb847b6b500b7c85b8880201dd5ea2450..aa999bd6fa8b14807c172772ed76a243d048b9bb 100644 (file)
@@ -112,12 +112,6 @@ public class NexusIndexerConsumer
         return "index-content";
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     @Override
     public void beginScan( ManagedRepository repository, Date whenGathered )
         throws ConsumerException
index dc1b0812612ac738f300ac18c258a07132e2807b..1dc82a50da2005466df644b471d20803239fa7a6 100644 (file)
@@ -164,12 +164,6 @@ public class LegacyConverterArtifactConsumer
         return "artifact-legacy-to-default-converter";
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     public void setExcludes( List<String> excludes )
     {
         this.excludes = excludes;
index 4c6077a69ede181cd61d89196c37288d558e0b45..507400eba40d0a2d680e2fdd0852b3edcc6168df 100644 (file)
@@ -175,7 +175,7 @@ public class RepositoryContentConsumers
 
         for ( KnownRepositoryContentConsumer consumer : getAvailableKnownConsumers() )
         {
-            if ( knownSelected.contains( consumer.getId() ) || consumer.isPermanent() )
+            if ( knownSelected.contains( consumer.getId() ) )
             {
                 ret.add( consumer );
             }
@@ -222,7 +222,7 @@ public class RepositoryContentConsumers
 
         for ( InvalidRepositoryContentConsumer consumer : getAvailableInvalidConsumers() )
         {
-            if ( invalidSelected.contains( consumer.getId() ) || consumer.isPermanent() )
+            if ( invalidSelected.contains( consumer.getId() ) )
             {
                 ret.add( consumer );
             }
index 6632c0ff698c1e4e0665dc485b99ba9f2586e7ab..cee2d72ec71e0a5bc281e3759d6950a25cb67d59 100644 (file)
@@ -118,12 +118,6 @@ public class InvalidScanConsumer
         return id;
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     public int getProcessCount()
     {
         return processCount;
index 77c7258ee62dea90e4b2f119b83d4b6e6b93c15e..f494bf4ec0ac8c5c20a3354cf1eb8a33c33e1d81 100644 (file)
@@ -126,12 +126,6 @@ public class KnownScanConsumer
         this.processCount = processCount;
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     @Override
     public boolean isProcessUnmodified()
     {
index 17138f732cac0e5136c80e7f0037a72763c5861a..ab9a3c8df4209a5cc9eb52d3820eb4d9cb14b98b 100644 (file)
@@ -105,12 +105,6 @@ public class SampleKnownConsumer
         return id;
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     public void setId( String id )
     {
         this.id = id;
index 773c8c536044c362c227fa71d09cc276481e86b8..2de47a1c32c4582b3cfe1a4a235e1a38768c5635 100644 (file)
@@ -62,12 +62,6 @@ public class TestConsumer
         return null;
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     @Override
     public List<String> getIncludes()
     {
index b7415874e43da009db758f1640e582394dcbdc8f..e3981bcbdf2e171a7bb33751943bb4388062f46a 100644 (file)
@@ -46,12 +46,6 @@ public class MockInvalidRepositoryContentConsumer
         return "the foo";
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     @Override
     public void addConsumerMonitor( ConsumerMonitor monitor )
     {
index 5cabece94bf0e50ab5805507bc3e9a199fe99c96..4983004041b370563e71b60d8a6cd5b27949af1c 100644 (file)
@@ -110,12 +110,6 @@ public class DuplicateArtifactsConsumer
         return description;
     }
 
-    @Override
-    public boolean isPermanent()
-    {
-        return false;
-    }
-
     @Override
     public List<String> getIncludes()
     {