diff options
author | Joakim Erdfelt <joakime@apache.org> | 2007-05-17 23:17:48 +0000 |
---|---|---|
committer | Joakim Erdfelt <joakime@apache.org> | 2007-05-17 23:17:48 +0000 |
commit | 650c56007ba781442ed781062e0d6727ab535cc8 (patch) | |
tree | 2a9bca88b748739374db62cb6fee0116f28c5431 /archiva-database/src | |
parent | 2ae3268ff900a8b649f8cc46fe6a23302978cacc (diff) | |
download | archiva-650c56007ba781442ed781062e0d6727ab535cc8.tar.gz archiva-650c56007ba781442ed781062e0d6727ab535cc8.zip |
[MRM-346]: Show Artifact results in error 500.
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@539163 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-database/src')
-rw-r--r-- | archiva-database/src/main/java/org/apache/maven/archiva/database/updater/DatabaseConsumers.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/DatabaseConsumers.java b/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/DatabaseConsumers.java index 6c4f65ffb..7b17528f4 100644 --- a/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/DatabaseConsumers.java +++ b/archiva-database/src/main/java/org/apache/maven/archiva/database/updater/DatabaseConsumers.java @@ -21,10 +21,12 @@ package org.apache.maven.archiva.database.updater; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.collections.Predicate; +import org.apache.commons.collections.functors.OrPredicate; import org.apache.maven.archiva.configuration.ArchivaConfiguration; import org.apache.maven.archiva.configuration.DatabaseScanningConfiguration; import org.apache.maven.archiva.consumers.DatabaseCleanupConsumer; import org.apache.maven.archiva.consumers.DatabaseUnprocessedArtifactConsumer; +import org.apache.maven.archiva.consumers.functors.PermanentConsumerPredicate; import org.codehaus.plexus.personality.plexus.lifecycle.phase.Initializable; import org.codehaus.plexus.personality.plexus.lifecycle.phase.InitializationException; @@ -58,9 +60,9 @@ public class DatabaseConsumers */ private List availableCleanupConsumers; - private SelectedCleanupConsumersPredicate selectedCleanupConsumers; + private Predicate selectedCleanupConsumers; - private SelectedUnprocessedConsumersPredicate selectedUnprocessedConsumers; + private Predicate selectedUnprocessedConsumers; class SelectedUnprocessedConsumersPredicate implements Predicate @@ -103,8 +105,10 @@ public class DatabaseConsumers public void initialize() throws InitializationException { - selectedCleanupConsumers = new SelectedCleanupConsumersPredicate(); - selectedUnprocessedConsumers = new SelectedUnprocessedConsumersPredicate(); + Predicate permanentConsumers = new PermanentConsumerPredicate(); + + selectedCleanupConsumers = new OrPredicate( permanentConsumers, new SelectedCleanupConsumersPredicate() ); + selectedUnprocessedConsumers = new OrPredicate( permanentConsumers, new SelectedUnprocessedConsumersPredicate() ); } /** @@ -132,7 +136,7 @@ public class DatabaseConsumers ret.addAll( CollectionUtils.select( availableCleanupConsumers, selectedCleanupConsumers ) ); return ret; } - + /** * Get the complete {@link List} of {@link DatabaseUnprocessedArtifactConsumer} objects * that are available in the system, regardless of configuration. @@ -143,7 +147,7 @@ public class DatabaseConsumers { return Collections.unmodifiableList( this.availableUnprocessedConsumers ); } - + /** * Get the complete {@link List} of {@link DatabaseCleanupConsumer} objects * that are available in the system, regardless of configuration. |