From 99117364be2b27ddb74fc6ffe3e052e0ad52d8dd Mon Sep 17 00:00:00 2001 From: Eric Barboni Date: Fri, 11 Apr 2014 23:46:35 +0200 Subject: one move for all remaining override annotation --- .../scanner/DefaultRepositoryScanner.java | 3 ++ .../scanner/RepositoryContentConsumers.java | 1 + .../scanner/RepositoryScannerInstance.java | 4 +++ .../functors/ConsumerProcessFileClosure.java | 1 + .../scanner/functors/TriggerBeginScanClosure.java | 1 + .../functors/TriggerScanCompletedClosure.java | 1 + .../scanner/ArchivaAdministrationStub.java | 23 ++++++++++++++ .../repository/scanner/InvalidScanConsumer.java | 11 +++++++ .../repository/scanner/KnownScanConsumer.java | 12 ++++++++ .../scanner/RepositoryContentConsumersTest.java | 35 ++++++++++++++++++++++ .../repository/scanner/SampleKnownConsumer.java | 11 +++++++ 11 files changed, 103 insertions(+) (limited to 'archiva-modules/archiva-base/archiva-repository-scanner') diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java index d485bd8e3..a38ad47c0 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/DefaultRepositoryScanner.java @@ -53,6 +53,7 @@ public class DefaultRepositoryScanner private Set inProgressScans = new LinkedHashSet(); + @Override public RepositoryScanStatistics scan( ManagedRepository repository, long changesSince ) throws RepositoryScannerException { @@ -70,6 +71,7 @@ public class DefaultRepositoryScanner } } + @Override public RepositoryScanStatistics scan( ManagedRepository repository, List knownContentConsumers, List invalidContentConsumers, @@ -155,6 +157,7 @@ public class DefaultRepositoryScanner return ids; } + @Override public Set getInProgressScans() { return inProgressScans; 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 5a5b4d71a..4ce22d2c4 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 @@ -68,6 +68,7 @@ public class RepositoryContentConsumers this.archivaAdministration = archivaAdministration; } + @Override public void setApplicationContext( ApplicationContext applicationContext ) throws BeansException { diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScannerInstance.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScannerInstance.java index 371776ab0..65cb6603c 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScannerInstance.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/RepositoryScannerInstance.java @@ -133,12 +133,14 @@ public class RepositoryScannerInstance return consumerCounts; } + @Override public void directoryWalkStarting( File basedir ) { log.info( "Walk Started: [{}] {}", this.repository.getId(), this.repository.getLocation() ); stats.triggerStart(); } + @Override public void directoryWalkStep( int percentage, File file ) { log.debug( "Walk Step: {}, {}", percentage, file ); @@ -167,6 +169,7 @@ public class RepositoryScannerInstance } } + @Override public void directoryWalkFinished() { TriggerScanCompletedClosure scanCompletedClosure = new TriggerScanCompletedClosure( repository, true ); @@ -183,6 +186,7 @@ public class RepositoryScannerInstance /** * Debug method from DirectoryWalker. */ + @Override public void debug( String message ) { log.debug( "Repository Scanner: {}", message ); diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java index 543a85eb5..69db9b786 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/ConsumerProcessFileClosure.java @@ -45,6 +45,7 @@ public class ConsumerProcessFileClosure private Map consumerCounts; + @Override public void execute( Object input ) { if ( input instanceof RepositoryContentConsumer ) diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java index 5c1e66e4e..b83085411 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerBeginScanClosure.java @@ -61,6 +61,7 @@ public class TriggerBeginScanClosure this.executeOnEntireRepo = executeOnEntireRepo; } + @Override public void execute( Object input ) { if ( input instanceof RepositoryContentConsumer ) diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java index 775037825..3b7cf9d7f 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/main/java/org/apache/archiva/repository/scanner/functors/TriggerScanCompletedClosure.java @@ -48,6 +48,7 @@ public class TriggerScanCompletedClosure this.executeOnEntireRepo = executeOnEntireRepo; } + @Override public void execute( Object input ) { if ( input instanceof RepositoryContentConsumer ) diff --git a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/ArchivaAdministrationStub.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/ArchivaAdministrationStub.java index 57041e32d..d3eadfdfa 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/ArchivaAdministrationStub.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/ArchivaAdministrationStub.java @@ -52,126 +52,147 @@ public class ArchivaAdministrationStub this.archivaConfiguration = archivaConfiguration; } + @Override public List getLegacyArtifactPaths() throws RepositoryAdminException { return null; } + @Override public void addLegacyArtifactPath( LegacyArtifactPath legacyArtifactPath, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public void deleteLegacyArtifactPath( String path, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public void addFileTypePattern( String fileTypeId, String pattern, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public void removeFileTypePattern( String fileTypeId, String pattern, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public List getFileTypes() throws RepositoryAdminException { return null; } + @Override public FileType getFileType( String fileTypeId ) throws RepositoryAdminException { return null; } + @Override public void addFileType( FileType fileType, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public void removeFileType( String fileTypeId, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public void addKnownContentConsumer( String knownContentConsumer, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public void setKnownContentConsumers( List knownContentConsumers, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public List getKnownContentConsumers() throws RepositoryAdminException { return archivaConfiguration.getConfiguration().getRepositoryScanning().getKnownContentConsumers(); } + @Override public void removeKnownContentConsumer( String knownContentConsumer, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public void addInvalidContentConsumer( String invalidContentConsumer, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public void setInvalidContentConsumers( List invalidContentConsumers, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public List getInvalidContentConsumers() throws RepositoryAdminException { return archivaConfiguration.getConfiguration().getRepositoryScanning().getInvalidContentConsumers(); } + @Override public void removeInvalidContentConsumer( String invalidContentConsumer, AuditInformation auditInformation ) throws RepositoryAdminException { } + @Override public OrganisationInformation getOrganisationInformation() throws RepositoryAdminException { return null; } + @Override public void setOrganisationInformation( OrganisationInformation organisationInformation ) throws RepositoryAdminException { } + @Override public UiConfiguration getUiConfiguration() throws RepositoryAdminException { return null; } + @Override public void updateUiConfiguration( UiConfiguration uiConfiguration ) throws RepositoryAdminException { @@ -179,12 +200,14 @@ public class ArchivaAdministrationStub } + @Override public NetworkConfiguration getNetworkConfiguration() throws RepositoryAdminException { return null; } + @Override public void setNetworkConfiguration( NetworkConfiguration networkConfiguration ) throws RepositoryAdminException { 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 f73496fab..717b8ba58 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 @@ -45,60 +45,71 @@ public class InvalidScanConsumer private int processCount = 0; + @Override public void beginScan( ManagedRepository repository, Date whenGathered ) throws ConsumerException { /* do nothing */ } + @Override public void beginScan( ManagedRepository repository, Date whenGathered, boolean executeOnEntireRepo ) throws ConsumerException { beginScan( repository, whenGathered ); } + @Override public void completeScan() { /* do nothing */ } + @Override public void completeScan( boolean executeOnEntireRepo ) { completeScan(); } + @Override public List getExcludes() { return null; } + @Override public List getIncludes() { return null; } + @Override public void processFile( String path ) throws ConsumerException { processCount++; } + @Override public void processFile( String path, boolean executeOnEntireRepo ) throws ConsumerException { processFile( path ); } + @Override public String getDescription() { return "Bad Content Scan Consumer (for testing)"; } + @Override public String getId() { return id; } + @Override public boolean isPermanent() { return false; 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 c75e6e5b3..77c7258ee 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 @@ -46,6 +46,7 @@ public class KnownScanConsumer private boolean processUnmodified = false; + @Override public List getExcludes() { return null; @@ -57,50 +58,59 @@ public class KnownScanConsumer this.includes.addAll( Arrays.asList( includesArray ) ); } + @Override public List getIncludes() { return includes; } + @Override public String getId() { return "test-scan-consumer"; } + @Override public String getDescription() { return "Scan Consumer (for testing)"; } + @Override public void beginScan( ManagedRepository repository, Date whenGathered ) throws ConsumerException { /* do nothing */ } + @Override public void beginScan( ManagedRepository repository, Date whenGathered, boolean executeOnEntireRepo ) throws ConsumerException { beginScan( repository, whenGathered ); } + @Override public void processFile( String path ) throws ConsumerException { this.processCount++; } + @Override public void processFile( String path, boolean executeOnEntireRepo ) throws Exception { processFile( path ); } + @Override public void completeScan() { /* do nothing */ } + @Override public void completeScan( boolean executeOnEntireRepo ) { completeScan(); @@ -116,11 +126,13 @@ public class KnownScanConsumer this.processCount = processCount; } + @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/RepositoryContentConsumersTest.java b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryContentConsumersTest.java index 568bdd7d1..a20d4688a 100644 --- a/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryContentConsumersTest.java +++ b/archiva-modules/archiva-base/archiva-repository-scanner/src/test/java/org/apache/archiva/repository/scanner/RepositoryContentConsumersTest.java @@ -368,62 +368,74 @@ public class RepositoryContentConsumersTest this.invalidRepositoryContentConsumers = invalidRepositoryContentConsumers; } + @Override public String getApplicationName() { return "foo"; } + @Override public AutowireCapableBeanFactory getAutowireCapableBeanFactory( ) throws IllegalStateException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public String getDisplayName( ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public String getId( ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public ApplicationContext getParent( ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public long getStartupDate( ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public boolean containsBeanDefinition( String beanName ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public int getBeanDefinitionCount( ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public String[] getBeanDefinitionNames( ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public String[] getBeanNamesForType( Class type ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public String[] getBeanNamesForType( Class type, boolean includeNonSingletons, boolean allowEagerInit ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public Map getBeansOfType( Class type ) throws BeansException { @@ -438,129 +450,152 @@ public class RepositoryContentConsumersTest throw new UnsupportedOperationException( "Should not have been called" ); } + @Override public Map getBeansOfType( Class type, boolean includeNonSingletons, boolean allowEagerInit ) throws BeansException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public boolean containsBean( String name ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public String[] getAliases( String name ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public Object getBean( String name ) throws BeansException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public Object getBean( String name, Class requiredType ) throws BeansException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public Object getBean( String name, Object[] args ) throws BeansException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public Class getType( String name ) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public boolean isPrototype( String name ) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public boolean isSingleton( String name ) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public boolean isTypeMatch( String name, Class targetType ) throws NoSuchBeanDefinitionException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public boolean containsLocalBean( String name ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public BeanFactory getParentBeanFactory( ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public String getMessage( String code, Object[] args, String defaultMessage, Locale locale ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public String getMessage( String code, Object[] args, Locale locale ) throws NoSuchMessageException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public String getMessage( MessageSourceResolvable resolvable, Locale locale ) throws NoSuchMessageException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public void publishEvent( ApplicationEvent event ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public Resource[] getResources( String locationPattern ) throws IOException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public ClassLoader getClassLoader( ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public Resource getResource( String location ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public T getBean( Class tClass ) throws BeansException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public Map getBeansWithAnnotation( Class aClass ) throws BeansException { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public A findAnnotationOnBean( String s, Class aClass ) { throw new UnsupportedOperationException( "Not supported yet." ); } + @Override public Environment getEnvironment() { return null; 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 fbaf2ec47..17138f732 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 @@ -41,60 +41,71 @@ public class SampleKnownConsumer */ private String id = "unset-id"; + @Override public void beginScan( ManagedRepository repository, Date whenGathered ) throws ConsumerException { /* nothing to do */ } + @Override public void beginScan( ManagedRepository repository, Date whenGathered, boolean executeOnEntireRepo ) throws ConsumerException { beginScan( repository, whenGathered ); } + @Override public void completeScan() { /* nothing to do */ } + @Override public void completeScan( boolean executeOnEntireRepo ) { completeScan(); } + @Override public List getExcludes() { return null; } + @Override public List getIncludes() { return null; } + @Override public void processFile( String path ) throws ConsumerException { /* nothing to do */ } + @Override public void processFile( String path, boolean executeOnEntireRepo ) throws Exception { processFile( path ); } + @Override public String getDescription() { return "Sample Known Consumer"; } + @Override public String getId() { return id; } + @Override public boolean isPermanent() { return false; -- cgit v1.2.3