diff options
author | Olivier Lamy <olamy@apache.org> | 2014-05-13 17:08:26 +1000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-05-13 17:08:26 +1000 |
commit | 011e7b0ee8dd90374f8039567c11f87a9e86de49 (patch) | |
tree | 0228d14ab8fea5eeab506f911e87eec47af729b3 /archiva-modules/archiva-base/archiva-consumers | |
parent | 76ad886e4fbb04df22e00ac507d44704148423ee (diff) | |
download | archiva-011e7b0ee8dd90374f8039567c11f87a9e86de49.tar.gz archiva-011e7b0ee8dd90374f8039567c11f87a9e86de49.zip |
[MRM-1837] so as it's only prototype we can assume configuration will not change during the use of the bean
Diffstat (limited to 'archiva-modules/archiva-base/archiva-consumers')
2 files changed, 19 insertions, 9 deletions
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 639ff00c8..50efbd936 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 @@ -50,7 +50,9 @@ import java.util.List; @Scope( "prototype" ) public class ArtifactMissingChecksumsConsumer extends AbstractMonitoredConsumer - implements KnownRepositoryContentConsumer, RegistryListener + implements KnownRepositoryContentConsumer + // it's prototype bean so we assume configuration won't change during a run + //, RegistryListener { private String id = "create-missing-checksums"; @@ -78,7 +80,7 @@ public class ArtifactMissingChecksumsConsumer this.configuration = configuration; this.filetypes = filetypes; - configuration.addChangeListener( this ); + //configuration.addChangeListener( this ); initIncludes(); } @@ -197,6 +199,7 @@ public class ArtifactMissingChecksumsConsumer } } + /* @Override public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue ) { @@ -206,22 +209,25 @@ public class ArtifactMissingChecksumsConsumer } } + @Override public void beforeConfigurationChange( Registry registry, String propertyName, Object propertyValue ) { - /* do nothing */ + // do nothing } + */ + private void initIncludes() { - includes = new ArrayList<String>( filetypes.getFileTypePatterns( FileTypes.ARTIFACTS ) ); + includes = new ArrayList<>( filetypes.getFileTypePatterns( FileTypes.ARTIFACTS ) ); } @PostConstruct public void initialize() { - configuration.addChangeListener( this ); + //configuration.addChangeListener( this ); initIncludes(); } 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 cb1f78f5c..8e234839e 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 @@ -61,7 +61,9 @@ import java.util.List; @Scope( "prototype" ) public class MetadataUpdaterConsumer extends AbstractMonitoredConsumer - implements KnownRepositoryContentConsumer, RegistryListener + implements KnownRepositoryContentConsumer + // it's prototype bean so we assume configuration won't change during a run + //, RegistryListener { private Logger log = LoggerFactory.getLogger( MetadataUpdaterConsumer.class ); @@ -292,6 +294,7 @@ public class MetadataUpdaterConsumer return false; } + /* @Override public void afterConfigurationChange( Registry registry, String propertyName, Object propertyValue ) { @@ -304,18 +307,19 @@ public class MetadataUpdaterConsumer @Override public void beforeConfigurationChange( Registry registry, String propertyName, Object propertyValue ) { - /* do nothing here */ + // do nothing here } + */ private void initIncludes() { - includes = new ArrayList<String>( filetypes.getFileTypePatterns( FileTypes.ARTIFACTS ) ); + includes = new ArrayList<>( filetypes.getFileTypePatterns( FileTypes.ARTIFACTS ) ); } @PostConstruct public void initialize() { - configuration.addChangeListener( this ); + //configuration.addChangeListener( this ); initIncludes(); } |