@@ -79,12 +79,6 @@ public class ArtifactCountConsumer | |||
return id; | |||
} | |||
@Override | |||
public boolean isPermanent() | |||
{ | |||
return false; | |||
} | |||
@Override | |||
public List<String> getExcludes() | |||
{ |
@@ -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. | |||
* |
@@ -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; | |||
} | |||
} |
@@ -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 |
@@ -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 |
@@ -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 |
@@ -296,12 +296,6 @@ public class MetadataUpdaterConsumer | |||
} | |||
} | |||
@Override | |||
public boolean isPermanent() | |||
{ | |||
return false; | |||
} | |||
/* | |||
@Override | |||
public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue ) |
@@ -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 |
@@ -122,12 +122,6 @@ public class RepositoryPurgeConsumer | |||
return this.description; | |||
} | |||
@Override | |||
public boolean isPermanent() | |||
{ | |||
return false; | |||
} | |||
@Override | |||
public List<String> getExcludes() | |||
{ |
@@ -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 |
@@ -106,12 +106,6 @@ public class ArchivaMetadataCreationConsumer | |||
return this.description; | |||
} | |||
@Override | |||
public boolean isPermanent() | |||
{ | |||
return true; | |||
} | |||
@Override | |||
public List<String> getExcludes() | |||
{ |
@@ -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; |
@@ -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 ); | |||
} |
@@ -118,12 +118,6 @@ public class InvalidScanConsumer | |||
return id; | |||
} | |||
@Override | |||
public boolean isPermanent() | |||
{ | |||
return false; | |||
} | |||
public int getProcessCount() | |||
{ | |||
return processCount; |
@@ -126,12 +126,6 @@ public class KnownScanConsumer | |||
this.processCount = processCount; | |||
} | |||
@Override | |||
public boolean isPermanent() | |||
{ | |||
return false; | |||
} | |||
@Override | |||
public boolean isProcessUnmodified() | |||
{ |
@@ -105,12 +105,6 @@ public class SampleKnownConsumer | |||
return id; | |||
} | |||
@Override | |||
public boolean isPermanent() | |||
{ | |||
return false; | |||
} | |||
public void setId( String id ) | |||
{ | |||
this.id = id; |
@@ -62,12 +62,6 @@ public class TestConsumer | |||
return null; | |||
} | |||
@Override | |||
public boolean isPermanent() | |||
{ | |||
return false; | |||
} | |||
@Override | |||
public List<String> getIncludes() | |||
{ |
@@ -46,12 +46,6 @@ public class MockInvalidRepositoryContentConsumer | |||
return "the foo"; | |||
} | |||
@Override | |||
public boolean isPermanent() | |||
{ | |||
return false; | |||
} | |||
@Override | |||
public void addConsumerMonitor( ConsumerMonitor monitor ) | |||
{ |
@@ -110,12 +110,6 @@ public class DuplicateArtifactsConsumer | |||
return description; | |||
} | |||
@Override | |||
public boolean isPermanent() | |||
{ | |||
return false; | |||
} | |||
@Override | |||
public List<String> getIncludes() | |||
{ |