diff --git a/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/admin/ArchivaAdministration.java b/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/admin/ArchivaAdministration.java index 57289303b..a6b37308f 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/admin/ArchivaAdministration.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/admin/ArchivaAdministration.java @@ -63,13 +63,20 @@ public interface ArchivaAdministration void addKnownContentConsumer( String knownContentConsumer, AuditInformation auditInformation ) throws RepositoryAdminException; + void setKnownContentConsumers( List knownContentConsumers, AuditInformation auditInformation ) + throws RepositoryAdminException; + + void removeKnownContentConsumer( String knownContentConsumer, AuditInformation auditInformation ) throws RepositoryAdminException; - void addInvalidContentConsumer( String knownContentConsumer, AuditInformation auditInformation ) + void addInvalidContentConsumer( String invalidContentConsumer, AuditInformation auditInformation ) throws RepositoryAdminException; - void removeInvalidContentConsumer( String knownContentConsumer, AuditInformation auditInformation ) + void setInvalidContentConsumers( List invalidContentConsumers, AuditInformation auditInformation ) + throws RepositoryAdminException; + + void removeInvalidContentConsumer( String invalidContentConsumer, AuditInformation auditInformation ) throws RepositoryAdminException; } diff --git a/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java b/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java index 2d50de92f..6f3ae7652 100644 --- a/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java +++ b/archiva-modules/archiva-base/archiva-repository-admin/src/main/java/org/apache/archiva/admin/repository/admin/DefaultArchivaAdministration.java @@ -109,6 +109,7 @@ public class DefaultArchivaAdministration fileType.addPattern( pattern ); saveConfiguration( configuration ); + triggerAuditEvent( "", "", AuditEvent.ADD_PATTERN, auditInformation ); } public void removeFileTypePattern( String fileTypeId, String pattern, AuditInformation auditInformation ) @@ -124,6 +125,7 @@ public class DefaultArchivaAdministration fileType.removePattern( pattern ); saveConfiguration( configuration ); + triggerAuditEvent( "", "", AuditEvent.REMOVE_PATTERN, auditInformation ); } public FileType getFileType( String fileTypeId ) @@ -200,7 +202,33 @@ public class DefaultArchivaAdministration triggerAuditEvent( "", "", AuditEvent.DISABLE_REPO_CONSUMER, auditInformation ); } -//------------------------- + public void setKnownContentConsumers( List knownContentConsumers, AuditInformation auditInformation ) + throws RepositoryAdminException + { + if ( knownContentConsumers == null ) + { + return; + } + for ( String knowContentConsumer : knownContentConsumers ) + { + addKnownContentConsumer( knowContentConsumer, auditInformation ); + } + } + + public void setInvalidContentConsumers( List invalidContentConsumers, AuditInformation auditInformation ) + throws RepositoryAdminException + { + if ( invalidContentConsumers == null ) + { + return; + } + for ( String invalidContentConsumer : invalidContentConsumers ) + { + addKnownContentConsumer( invalidContentConsumer, auditInformation ); + } + } + + //------------------------- // //-------------------------