aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Barboni <skygo@apache.org>2014-10-10 22:41:59 +0200
committerEric Barboni <skygo@apache.org>2014-10-10 22:41:59 +0200
commitc2f9100ddaaa842f4aadd11943d27b5d1142c0e0 (patch)
tree8c94277cc1e78d51c1bcdd20d6adfd7f113564c1
parentb0e3b2fc5aae23941e1c8fb56a12ef3bbad9f092 (diff)
downloadarchiva-c2f9100ddaaa842f4aadd11943d27b5d1142c0e0.tar.gz
archiva-c2f9100ddaaa842f4aadd11943d27b5d1142c0e0.zip
MRM-1865 remove isPermanent flag
-rw-r--r--archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/Consumer.java7
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/PermanentConsumerPredicate.java48
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java11
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java4
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java6
-rw-r--r--archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/SampleKnownConsumer.java6
-rw-r--r--archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java6
-rw-r--r--archiva-modules/archiva-web/archiva-test-mocks/src/main/java/org/apache/archiva/web/mocks/MockInvalidRepositoryContentConsumer.java6
-rw-r--r--archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java6
19 files changed, 3 insertions, 157 deletions
diff --git a/archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java b/archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java
index 6ac24d5ce..583add4f7 100644
--- a/archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java
+++ b/archiva-cli/src/main/java/org/apache/archiva/cli/ArtifactCountConsumer.java
@@ -80,12 +80,6 @@ public class ArtifactCountConsumer
}
@Override
- public boolean isPermanent()
- {
- return false;
- }
-
- @Override
public List<String> getExcludes()
{
return null;
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/Consumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/Consumer.java
index 103f85a63..b393ec3c3 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/Consumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/Consumer.java
@@ -41,13 +41,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.
*
* @param monitor the monitor to add.
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
index af76c4556..000000000
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-consumer-api/src/main/java/org/apache/archiva/consumers/functors/PermanentConsumerPredicate.java
+++ /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;
- }
-
-}
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
index e04d74422..70fb11933 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ArtifactMissingChecksumsConsumer.java
@@ -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
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java
index 3c9c7507c..b323e0190 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRemoveConsumer.java
@@ -93,12 +93,6 @@ public class AutoRemoveConsumer
}
@Override
- public boolean isPermanent()
- {
- return false;
- }
-
- @Override
public void beginScan( ManagedRepository repository, Date whenGathered )
throws ConsumerException
{
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java
index d42cbcff7..9445bc98e 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/AutoRenameConsumer.java
@@ -87,12 +87,6 @@ public class AutoRenameConsumer
}
@Override
- public boolean isPermanent()
- {
- return false;
- }
-
- @Override
public void beginScan( ManagedRepository repository, Date whenGathered )
throws ConsumerException
{
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java
index 2f2ca6d29..fe158db9f 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/MetadataUpdaterConsumer.java
@@ -296,12 +296,6 @@ public class MetadataUpdaterConsumer
}
}
- @Override
- public boolean isPermanent()
- {
- return false;
- }
-
/*
@Override
public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue )
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java
index 35e8bd5f9..4f7de3755 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/ValidateChecksumConsumer.java
@@ -95,12 +95,6 @@ public class ValidateChecksumConsumer
}
@Override
- public boolean isPermanent()
- {
- return false;
- }
-
- @Override
public void beginScan( ManagedRepository repository, Date whenGathered )
throws ConsumerException
{
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
index 53c6f12c5..41e4761f9 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
@@ -123,12 +123,6 @@ public class RepositoryPurgeConsumer
}
@Override
- public boolean isPermanent()
- {
- return false;
- }
-
- @Override
public List<String> getExcludes()
{
return getDefaultArtifactExclusions();
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java
index 4e6df8cdb..aa999bd6f 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-lucene-consumers/src/main/java/org/apache/archiva/consumers/lucene/NexusIndexerConsumer.java
@@ -113,12 +113,6 @@ public class NexusIndexerConsumer
}
@Override
- public boolean isPermanent()
- {
- return false;
- }
-
- @Override
public void beginScan( ManagedRepository repository, Date whenGathered )
throws ConsumerException
{
diff --git a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java
index 280a9dc17..a25457cb3 100644
--- a/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java
+++ b/archiva-modules/archiva-base/archiva-consumers/archiva-metadata-consumer/src/main/java/org/apache/archiva/consumers/metadata/ArchivaMetadataCreationConsumer.java
@@ -107,12 +107,6 @@ public class ArchivaMetadataCreationConsumer
}
@Override
- public boolean isPermanent()
- {
- return true;
- }
-
- @Override
public List<String> getExcludes()
{
return getDefaultArtifactExclusions();
diff --git a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
index dc1b08126..1dc82a50d 100644
--- a/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
+++ b/archiva-modules/archiva-base/archiva-converter/src/main/java/org/apache/archiva/converter/legacy/LegacyConverterArtifactConsumer.java
@@ -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;
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
index 4c6077a69..507400eba 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryContentConsumers.java
@@ -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 );
}
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java
index 6632c0ff6..cee2d72ec 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/InvalidScanConsumer.java
@@ -118,12 +118,6 @@ public class InvalidScanConsumer
return id;
}
- @Override
- public boolean isPermanent()
- {
- return false;
- }
-
public int getProcessCount()
{
return processCount;
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java
index 77c7258ee..f494bf4ec 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/KnownScanConsumer.java
@@ -127,12 +127,6 @@ public class KnownScanConsumer
}
@Override
- public boolean isPermanent()
- {
- return false;
- }
-
- @Override
public boolean isProcessUnmodified()
{
return processUnmodified;
diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/SampleKnownConsumer.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/SampleKnownConsumer.java
index 17138f732..ab9a3c8df 100644
--- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/SampleKnownConsumer.java
+++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/SampleKnownConsumer.java
@@ -105,12 +105,6 @@ public class SampleKnownConsumer
return id;
}
- @Override
- public boolean isPermanent()
- {
- return false;
- }
-
public void setId( String id )
{
this.id = id;
diff --git a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java
index 773c8c536..2de47a1c3 100644
--- a/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java
+++ b/archiva-modules/archiva-scheduler/archiva-scheduler-repository/src/test/java/org/apache/archiva/scheduler/repository/TestConsumer.java
@@ -63,12 +63,6 @@ public class TestConsumer
}
@Override
- public boolean isPermanent()
- {
- return false;
- }
-
- @Override
public List<String> getIncludes()
{
return Collections.singletonList( "**/**" );
diff --git a/archiva-modules/archiva-web/archiva-test-mocks/src/main/java/org/apache/archiva/web/mocks/MockInvalidRepositoryContentConsumer.java b/archiva-modules/archiva-web/archiva-test-mocks/src/main/java/org/apache/archiva/web/mocks/MockInvalidRepositoryContentConsumer.java
index b7415874e..e3981bcbd 100644
--- a/archiva-modules/archiva-web/archiva-test-mocks/src/main/java/org/apache/archiva/web/mocks/MockInvalidRepositoryContentConsumer.java
+++ b/archiva-modules/archiva-web/archiva-test-mocks/src/main/java/org/apache/archiva/web/mocks/MockInvalidRepositoryContentConsumer.java
@@ -47,12 +47,6 @@ public class MockInvalidRepositoryContentConsumer
}
@Override
- public boolean isPermanent()
- {
- return false;
- }
-
- @Override
public void addConsumerMonitor( ConsumerMonitor monitor )
{
//To change body of implemented methods use File | Settings | File Templates.
diff --git a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java
index 5cabece94..498300404 100644
--- a/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java
+++ b/archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/consumers/DuplicateArtifactsConsumer.java
@@ -111,12 +111,6 @@ public class DuplicateArtifactsConsumer
}
@Override
- public boolean isPermanent()
- {
- return false;
- }
-
- @Override
public List<String> getIncludes()
{
return includes;