]> source.dussan.org Git - archiva.git/commitdiff
Migrating basic event API to archiva commons
authorMartin Stockhammer <martin_s@apache.org>
Thu, 3 Oct 2019 16:30:48 +0000 (18:30 +0200)
committerMartin Stockhammer <martin_s@apache.org>
Thu, 3 Oct 2019 16:30:48 +0000 (18:30 +0200)
39 files changed:
archiva-modules/archiva-base/archiva-common/pom.xml
archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/event/Event.java
archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/event/EventHandler.java
archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/event/EventManager.java
archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/event/EventSource.java
archiva-modules/archiva-base/archiva-common/src/main/java/org/apache/archiva/event/EventType.java
archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/event/EventManagerTest.java [new file with mode: 0644]
archiva-modules/archiva-base/archiva-consumers/archiva-consumer-archetype/src/main/resources/archetype-resources/src/test/java/RepositoryProviderMock.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurge.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurge.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurge.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RepositoryPurgeConsumer.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/main/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurge.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/AbstractRepositoryPurgeTest.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/CleanupReleasedSnapshotsRepositoryPurgeTest.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/DaysOldRepositoryPurgeTest.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/consumers/core/repository/RetentionCountRepositoryPurgeTest.java
archiva-modules/archiva-base/archiva-consumers/archiva-core-consumers/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java
archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/ArchivaProxyRegistry.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/Repository.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/RepositoryProvider.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/event/LifecycleEvent.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/event/RepositoryEvent.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/event/RepositoryIndexEvent.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/event/RepositoryRegistryEvent.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/event/RepositoryValueEvent.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/features/AbstractFeature.java
archiva-modules/archiva-base/archiva-repository-api/src/main/java/org/apache/archiva/repository/features/IndexCreationFeature.java
archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/AbstractRepository.java
archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/archiva/repository/RepositoryRegistry.java
archiva-modules/archiva-base/archiva-repository-layer/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java
archiva-modules/archiva-maven/archiva-maven-proxy/src/test/java/org/apache/archiva/repository/mock/RepositoryProviderMock.java
archiva-modules/archiva-maven/archiva-maven-repository/src/main/java/org/apache/archiva/repository/maven2/MavenRepositoryProvider.java
archiva-modules/archiva-web/archiva-rest/archiva-rest-services/src/main/java/org/apache/archiva/rest/services/DefaultRepositoriesService.java
archiva-modules/archiva-web/archiva-security/src/test/java/org/apache/archiva/security/mock/MockBeanServices.java
archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/DefaultMetadataResolver.java
archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/repository/event/RepositoryListener.java
archiva-modules/plugins/metadata-store-cassandra/src/test/java/org/apache/archiva/metadata/repository/cassandra/MockRepositoryStorage.java
archiva-modules/plugins/problem-reports/src/main/java/org/apache/archiva/reports/RepositoryProblemEventListener.java

index ea5d87f42ef6d5993734118def46096c5ffb8d08..df8348a2922d35fa54fa62fddeebd70632f4ff3b 100644 (file)
       <groupId>org.eclipse.sisu</groupId>
       <artifactId>org.eclipse.sisu.plexus</artifactId>
     </dependency>
+
+
+    <dependency>
+      <groupId>org.junit.platform</groupId>
+      <artifactId>junit-platform-launcher</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.junit.platform</groupId>
+      <artifactId>junit-platform-console-standalone</artifactId>
+      <scope>test</scope>
+    </dependency>
+    <dependency>
+      <groupId>org.junit.jupiter</groupId>
+      <artifactId>junit-jupiter-engine</artifactId>
+      <scope>test</scope>
+    </dependency>
+
   </dependencies>
   <build>
     <pluginManagement>
index dc91defc5564eb4e8946d5b1d77d1efe124ac97a..eda85701e42684b78cc82563a875ea019d56811c 100644 (file)
@@ -1,4 +1,4 @@
-package org.apache.archiva.repository.events;
+package org.apache.archiva.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
index 9f2d4411e771edc2ccdefb49afcb40b06b934379..5217f1152ca39840ac9fae3f00ec5b9a2478ac57 100644 (file)
@@ -1,4 +1,4 @@
-package org.apache.archiva.repository.events;
+package org.apache.archiva.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +19,8 @@ package org.apache.archiva.repository.events;
  * under the License.
  */
 
+import org.apache.archiva.event.Event;
+
 import java.util.EventListener;
 
 /**
index 694cfd9e62b346e7ddcab6fa4e86254445b29441..189f9500ed1b77e8f4af1de3824b8968aa7b7584 100644 (file)
@@ -1,4 +1,4 @@
-package org.apache.archiva.repository.events;
+package org.apache.archiva.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -25,7 +25,8 @@ import org.slf4j.LoggerFactory;
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 
-public class EventManager implements EventSource {
+public class EventManager implements EventSource
+{
 
     private static final Logger log = LoggerFactory.getLogger(EventManager.class);
 
index cffaeaf56ebe3b40d83afbfe6a7bfff72a3f5733..452a5e9d9d393b0bd52c31d1f3a0cd9d3c6b36ba 100644 (file)
@@ -1,4 +1,4 @@
-package org.apache.archiva.repository.events;
+package org.apache.archiva.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -26,7 +26,7 @@ package org.apache.archiva.repository.events;
  */
 public interface EventSource {
 
-    <T extends Event> void registerEventHandler(EventType<T> type, EventHandler<? super T> eventHandler);
+    <T extends Event> void registerEventHandler( EventType<T> type, EventHandler<? super T> eventHandler);
 
     <T extends Event> void unregisterEventHandler(EventType<T> type, EventHandler<? super T> eventHandler);
 
index ab9678ab2e66b32d9d1f8f42356c80fbc81cd4d6..58a92138210b02cd90bab169e76e1e230dcf0f4d 100644 (file)
@@ -1,4 +1,4 @@
-package org.apache.archiva.repository.events;
+package org.apache.archiva.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
diff --git a/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/event/EventManagerTest.java b/archiva-modules/archiva-base/archiva-common/src/test/java/org/apache/archiva/event/EventManagerTest.java
new file mode 100644 (file)
index 0000000..e486c53
--- /dev/null
@@ -0,0 +1,46 @@
+package org.apache.archiva.event;
+
+/*
+ * 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.junit.Test;
+
+import static org.junit.Assert.*;
+
+/**
+ * @author Martin Stockhammer <martin_s@apache.org>
+ */
+public class EventManagerTest
+{
+
+    @Test
+    public void registerEventHandler( )
+    {
+    }
+
+    @Test
+    public void unregisterEventHandler( )
+    {
+    }
+
+    @Test
+    public void fireEvent( )
+    {
+    }
+}
\ No newline at end of file
index 1691b58ba469555e95e4d4388982202f1b5740ac..f81fb419517fb38cf9d4ed7237c9495b2a9f719c 100644 (file)
@@ -36,7 +36,7 @@ import org.apache.archiva.repository.RepositoryCredentials;
 import org.apache.archiva.repository.RepositoryException;
 import org.apache.archiva.repository.RepositoryProvider;
 import org.apache.archiva.repository.RepositoryType;
-import org.apache.archiva.repository.events.Event;
+import org.apache.archiva.event.Event;
 import org.apache.archiva.repository.features.ArtifactCleanupFeature;
 import org.apache.archiva.repository.features.IndexCreationFeature;
 import org.apache.archiva.repository.features.RemoteIndexFeature;
index f6db1726ac26fef6a68ee20b89cd1854b088bfe2..bf8105ea19447ccab6b11f342cfdb85e88ea8928 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.archiva.metadata.repository.*;
 import org.apache.archiva.model.ArtifactReference;
 import org.apache.archiva.repository.ContentNotFoundException;
 import org.apache.archiva.repository.ManagedRepositoryContent;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.repository.storage.StorageAsset;
 import org.apache.archiva.repository.storage.StorageUtil;
 import org.apache.commons.lang3.StringUtils;
index 7030ac74b7718aff59a7d5bef8fa881d33394ec1..ad40b56e779f6367216eb1dc90daea7646bff3b6 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.archiva.repository.ManagedRepositoryContent;
 import org.apache.archiva.repository.ReleaseScheme;
 import org.apache.archiva.repository.RepositoryException;
 import org.apache.archiva.repository.RepositoryRegistry;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.repository.metadata.MetadataTools;
 import org.apache.archiva.repository.metadata.RepositoryMetadataException;
 
index 71cdeb938f82bb03655f85ead55a977e0cdfbca7..7daf3eabe9fe6adb1bef6270fa4b76878698c1ed 100644 (file)
@@ -27,11 +27,9 @@ import org.apache.archiva.model.VersionedReference;
 import org.apache.archiva.repository.ContentNotFoundException;
 import org.apache.archiva.repository.LayoutException;
 import org.apache.archiva.repository.ManagedRepositoryContent;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.repository.storage.StorageAsset;
-import org.apache.commons.lang3.time.DateUtils;
 
-import java.io.IOException;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.nio.file.Paths;
index 536e1fd46f1a3c6dd00ac34125b7522bcee2ff32..d6929d93991b8fadec08539ec390078100e623f1 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.archiva.repository.ManagedRepository;
 import org.apache.archiva.repository.ManagedRepositoryContent;
 import org.apache.archiva.repository.RepositoryContentFactory;
 import org.apache.archiva.repository.RepositoryRegistry;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.repository.features.ArtifactCleanupFeature;
 import org.apache.archiva.repository.metadata.MetadataTools;
 import org.springframework.beans.factory.annotation.Autowired;
index a364dc3a13c1687076d5931567930f7f6c75a701..561d266d99234203d56131e2bf7c71707e7f7e57 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.archiva.model.VersionedReference;
 import org.apache.archiva.repository.ContentNotFoundException;
 import org.apache.archiva.repository.LayoutException;
 import org.apache.archiva.repository.ManagedRepositoryContent;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 
 import java.nio.file.Files;
 import java.nio.file.Path;
index 86bd424271dd570dc01f9ec19f349a152abb293c..d2459a1aadb9017459548f03cb085194c058b2cb 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.archiva.repository.BasicManagedRepository;
 import org.apache.archiva.repository.ManagedRepositoryContent;
 import org.apache.archiva.repository.ReleaseScheme;
 import org.apache.archiva.repository.RepositoryContentProvider;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.repository.features.ArtifactCleanupFeature;
 import org.apache.archiva.test.utils.ArchivaSpringJUnit4ClassRunner;
 import org.apache.commons.io.FileUtils;
@@ -57,7 +57,6 @@ import java.util.stream.Collectors;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 import static org.mockito.Mockito.mock;
-import static org.mockito.Mockito.when;
 
 /**
  */
index 18c3d287765b0bae1040cbbeb6e0db51ade6a857..281f1832a35c26e1c94cd6506cd4fdf1076ab39b 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.archiva.metadata.model.MetadataFacet;
 import org.apache.archiva.repository.ManagedRepository;
 import org.apache.archiva.repository.RepositoryContentFactory;
 import org.apache.archiva.repository.RepositoryRegistry;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.repository.metadata.MetadataTools;
 import org.custommonkey.xmlunit.XMLAssert;
 import org.easymock.EasyMock;
index d26350c4780fc41b8730ffeda4469e916d40af76..c108330018ccfe42e4e1c287ce577c22e67cb557 100644 (file)
@@ -20,9 +20,8 @@ package org.apache.archiva.consumers.core.repository;
  */
 
 import org.apache.archiva.metadata.model.ArtifactMetadata;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.repository.features.ArtifactCleanupFeature;
-import org.apache.commons.lang3.time.DateUtils;
 import org.easymock.EasyMock;
 import org.junit.After;
 import org.junit.Test;
index 3a06774f1877f60d4787c4ceccffb4fec33203ff..2d3275a80e23398b6c636dbb5d5b0d6e005ad8a9 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.archiva.consumers.core.repository;
  */
 
 import org.apache.archiva.metadata.model.ArtifactMetadata;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.repository.features.ArtifactCleanupFeature;
 import org.easymock.EasyMock;
 import org.junit.After;
index 82959a0b3347d47b449d35feaa6ae5b37798fbdf..a12eac5ea39631cb828aac6fc785f2ead5f5c0cf 100644 (file)
@@ -32,8 +32,7 @@ import org.apache.archiva.repository.PasswordCredentials;
 import org.apache.archiva.repository.ReleaseScheme;
 import org.apache.archiva.repository.RemoteRepository;
 import org.apache.archiva.repository.RepositoryCredentials;
-import org.apache.archiva.repository.events.Event;
-import org.apache.archiva.repository.events.RepositoryValueEvent;
+import org.apache.archiva.event.Event;
 import org.apache.archiva.repository.RepositoryException;
 import org.apache.archiva.repository.RepositoryGroup;
 import org.apache.archiva.repository.RepositoryProvider;
index a42ab95cc48e06a049cdd66eca6fc3705ce78fe0..94bbb5782dc822cbdacafddeb5a0ec926d390aca 100644 (file)
@@ -32,8 +32,8 @@ import org.apache.archiva.repository.ManagedRepository;
 import org.apache.archiva.repository.RemoteRepository;
 import org.apache.archiva.repository.RepositoryRegistry;
 import org.apache.archiva.repository.RepositoryType;
-import org.apache.archiva.repository.events.EventHandler;
-import org.apache.archiva.repository.events.RepositoryRegistryEvent;
+import org.apache.archiva.event.EventHandler;
+import org.apache.archiva.repository.event.RepositoryRegistryEvent;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;
index c88dc6310dcdf8baa70bdae02bf0fcb88de9c154..f497efcec0cac20447e5017cd1c424946dba602a 100644 (file)
@@ -20,7 +20,7 @@ package org.apache.archiva.repository;
  */
 
 import org.apache.archiva.indexer.ArchivaIndexingContext;
-import org.apache.archiva.repository.events.EventSource;
+import org.apache.archiva.event.EventSource;
 import org.apache.archiva.repository.storage.RepositoryStorage;
 import org.apache.archiva.repository.features.RepositoryFeature;
 import org.apache.archiva.repository.storage.StorageAsset;
index cba28e1489e252fe066a70b75c7bce224d617445..434c41deb2a5ed4f66b91598ec9c16875a464331 100644 (file)
@@ -22,7 +22,7 @@ package org.apache.archiva.repository;
 import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.archiva.configuration.RemoteRepositoryConfiguration;
 import org.apache.archiva.configuration.RepositoryGroupConfiguration;
-import org.apache.archiva.repository.events.EventHandler;
+import org.apache.archiva.event.EventHandler;
 
 import java.io.IOException;
 import java.util.Set;
index 6408eb53494483b9dd428983aff12e634e1d7131..cb751c21b1669284835f71e4e36cb77d7cbeffd2 100644 (file)
@@ -1,4 +1,4 @@
-package org.apache.archiva.repository.events;
+package org.apache.archiva.repository.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +19,7 @@ package org.apache.archiva.repository.events;
  * under the License.
  */
 
+import org.apache.archiva.event.EventType;
 import org.apache.archiva.repository.Repository;
 
 /**
index 28d4770c019ecb1ea1686ac5d920cbce44c13502..88c95adde778c61621094ca89215f5575faa9c2b 100644 (file)
@@ -1,4 +1,4 @@
-package org.apache.archiva.repository.events;
+package org.apache.archiva.repository.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,13 +19,16 @@ package org.apache.archiva.repository.events;
  * under the License.
  */
 
+import org.apache.archiva.event.Event;
+import org.apache.archiva.event.EventType;
 import org.apache.archiva.repository.Repository;
 
 /**
  * A repository event is specific to a repository and holds a reference to the repository that
  * is related to this event.
  */
-public class RepositoryEvent extends Event {
+public class RepositoryEvent extends Event
+{
 
     private static final long serialVersionUID = 4676673476606414834L;
 
index 9f1b2a60d13b9c7a299ae75aef99efc465236e42..d1168dfa92b64a1af8957aa1a6aad08288de28b8 100644 (file)
@@ -1,4 +1,4 @@
-package org.apache.archiva.repository.events;
+package org.apache.archiva.repository.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -20,6 +20,7 @@ package org.apache.archiva.repository.events;
  */
 
 
+import org.apache.archiva.event.EventType;
 import org.apache.archiva.repository.Repository;
 
 import java.net.URI;
index fbaa97199baf1392e979d186312fd4824d504bba..1e11579590661109265b7c5f1455a7d04a7bef5f 100644 (file)
@@ -1,4 +1,4 @@
-package org.apache.archiva.repository.events;
+package org.apache.archiva.repository.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,10 +19,14 @@ package org.apache.archiva.repository.events;
  * under the License.
  */
 
+import org.apache.archiva.event.Event;
+import org.apache.archiva.event.EventType;
+
 /**
  * Repository registry events are raised by the repository registry itself.
  */
-public class RepositoryRegistryEvent extends Event {
+public class RepositoryRegistryEvent extends Event
+{
 
     private static final long serialVersionUID = -4740127827269612094L;
 
index 448d720277d334b04e8fa74909c840c10c38ddf9..b9ff4486b33e37d20c32662766d3b19d08b49fd8 100644 (file)
@@ -1,4 +1,4 @@
-package org.apache.archiva.repository.events;
+package org.apache.archiva.repository.event;
 
 /*
  * Licensed to the Apache Software Foundation (ASF) under one
@@ -19,6 +19,7 @@ package org.apache.archiva.repository.events;
  * under the License.
  */
 
+import org.apache.archiva.event.EventType;
 import org.apache.archiva.repository.Repository;
 
 /**
index 60a1dce3f47fb2384422903299da9aee4a9a6ec3..d74d0eb65a32a64b77f35a0ea7cdee25ea699de3 100644 (file)
@@ -19,8 +19,8 @@ package org.apache.archiva.repository.features;
  * under the License.
  */
 
-import org.apache.archiva.repository.events.Event;
-import org.apache.archiva.repository.events.EventHandler;
+import org.apache.archiva.event.Event;
+import org.apache.archiva.event.EventHandler;
 
 import java.util.ArrayList;
 import java.util.Collection;
index f9de498d724825319bdcb93bb042c05492535af0..fafd2763f2004d97b27eba834a18f5dafbd47668 100644 (file)
@@ -21,8 +21,8 @@ package org.apache.archiva.repository.features;
 
 
 import org.apache.archiva.repository.Repository;
-import org.apache.archiva.repository.events.RepositoryIndexEvent;
-import org.apache.archiva.repository.events.EventHandler;
+import org.apache.archiva.repository.event.RepositoryIndexEvent;
+import org.apache.archiva.event.EventHandler;
 import org.apache.archiva.repository.storage.StorageAsset;
 import org.apache.commons.lang3.StringUtils;
 
index 3172c7e7a4830fb07b7f603b5bec94fbc9a77a3a..0cbf261c1e062fee034d8ef7d64f344f34526c50 100644 (file)
@@ -23,8 +23,12 @@ import com.cronutils.model.CronType;
 import com.cronutils.model.definition.CronDefinition;
 import com.cronutils.model.definition.CronDefinitionBuilder;
 import com.cronutils.parser.CronParser;
+import org.apache.archiva.event.Event;
+import org.apache.archiva.event.EventHandler;
+import org.apache.archiva.event.EventManager;
+import org.apache.archiva.event.EventType;
 import org.apache.archiva.indexer.ArchivaIndexingContext;
-import org.apache.archiva.repository.events.*;
+import org.apache.archiva.repository.event.*;
 import org.apache.archiva.repository.storage.RepositoryStorage;
 import org.apache.archiva.repository.storage.StorageAsset;
 import org.apache.archiva.repository.features.RepositoryFeature;
@@ -40,11 +44,9 @@ import java.net.URI;
 import java.nio.channels.ReadableByteChannel;
 import java.nio.channels.WritableByteChannel;
 import java.nio.file.CopyOption;
-import java.util.ArrayList;
 import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
-import java.util.List;
 import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
@@ -341,7 +343,7 @@ public abstract class AbstractRepository implements EditableRepository, EventHan
     }
 
     @Override
-    public <T extends Event> void registerEventHandler(EventType<T> eventType, EventHandler<? super T> eventHandler) {
+    public <T extends Event> void registerEventHandler( EventType<T> eventType, EventHandler<? super T> eventHandler) {
         if (!EventType.isInstanceOf(eventType, RepositoryEvent.ANY)) {
             throw new IllegalArgumentException("Can only register RepositoryEvent Handlers");
         }
index 998b79be846227ebc6f1ca81988c4477a91d7ffb..b265eef256acc78884502d218840759731bb337b 100644 (file)
@@ -20,10 +20,14 @@ package org.apache.archiva.repository;
  */
 
 import org.apache.archiva.configuration.*;
+import org.apache.archiva.event.Event;
+import org.apache.archiva.event.EventManager;
+import org.apache.archiva.event.EventSource;
+import org.apache.archiva.event.EventType;
 import org.apache.archiva.indexer.*;
 import org.apache.archiva.redback.components.registry.RegistryException;
-import org.apache.archiva.repository.events.*;
-import org.apache.archiva.repository.events.EventHandler;
+import org.apache.archiva.repository.event.*;
+import org.apache.archiva.event.EventHandler;
 import org.apache.archiva.repository.features.IndexCreationFeature;
 import org.apache.archiva.repository.features.StagingRepositoryFeature;
 import org.apache.commons.lang3.StringUtils;
@@ -1220,7 +1224,7 @@ public class RepositoryRegistry implements ConfigurationListener, EventSource, E
 
 
     @Override
-    public <T extends Event> void registerEventHandler(EventType<T> type, EventHandler<? super T> eventHandler) {
+    public <T extends Event> void registerEventHandler( EventType<T> type, EventHandler<? super T> eventHandler) {
         eventManager.registerEventHandler(type, eventHandler);
     }
 
index 801f5197ce3ce222746d9acebab9275ec45c1748..95b1d8654c02b4827b3f1117da24c649c5cb6445 100644 (file)
@@ -23,8 +23,7 @@ import org.apache.archiva.configuration.ManagedRepositoryConfiguration;
 import org.apache.archiva.configuration.RemoteRepositoryConfiguration;
 import org.apache.archiva.configuration.RepositoryGroupConfiguration;
 import org.apache.archiva.repository.*;
-import org.apache.archiva.repository.events.Event;
-import org.apache.archiva.repository.events.RepositoryValueEvent;
+import org.apache.archiva.event.Event;
 import org.apache.archiva.repository.features.ArtifactCleanupFeature;
 import org.apache.archiva.repository.features.IndexCreationFeature;
 import org.apache.archiva.repository.features.RemoteIndexFeature;
index 04ff8c071f32dbc8d4e63b3ddc9f5f7593fb1a1f..805c2579b716134f68bcef53ee977ec0df9e1769 100644 (file)
@@ -32,8 +32,7 @@ import org.apache.archiva.repository.PasswordCredentials;
 import org.apache.archiva.repository.ReleaseScheme;
 import org.apache.archiva.repository.RemoteRepository;
 import org.apache.archiva.repository.RepositoryCredentials;
-import org.apache.archiva.repository.events.Event;
-import org.apache.archiva.repository.events.RepositoryValueEvent;
+import org.apache.archiva.event.Event;
 import org.apache.archiva.repository.RepositoryException;
 import org.apache.archiva.repository.RepositoryGroup;
 import org.apache.archiva.repository.RepositoryProvider;
index b477af2ac69264a4d9ded2c7f906ab08638485a1..7ddff53611f4d5e1f4731460a7c228e571062b76 100644 (file)
@@ -22,7 +22,7 @@ package org.apache.archiva.repository.maven2;
 import org.apache.archiva.common.filelock.FileLockManager;
 import org.apache.archiva.configuration.*;
 import org.apache.archiva.repository.*;
-import org.apache.archiva.repository.events.Event;
+import org.apache.archiva.event.Event;
 import org.apache.archiva.repository.features.ArtifactCleanupFeature;
 import org.apache.archiva.repository.features.IndexCreationFeature;
 import org.apache.archiva.repository.features.RemoteIndexFeature;
index d81afd2e91acf9682940ffa09cd8cb682587a805..01b07ff8418c12cef58988c45bcd144478d24218 100644 (file)
@@ -53,7 +53,7 @@ import org.apache.archiva.repository.RepositoryRegistry;
 import org.apache.archiva.repository.storage.RepositoryStorage;
 import org.apache.archiva.repository.storage.StorageAsset;
 import org.apache.archiva.repository.storage.StorageUtil;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.repository.metadata.MetadataTools;
 import org.apache.archiva.repository.metadata.RepositoryMetadataException;
 import org.apache.archiva.repository.metadata.RepositoryMetadataWriter;
index e0d55855d385624594b3b9ee1e6e010be9abe508..d6fa8b5350314f5bdd6aff45d8b92f328047cd93 100644 (file)
@@ -30,7 +30,7 @@ import org.apache.archiva.policies.ProxyDownloadException;
 import org.apache.archiva.redback.components.taskqueue.TaskQueueException;
 import org.apache.archiva.repository.ManagedRepository;
 import org.apache.archiva.repository.ManagedRepositoryContent;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.scheduler.repository.model.RepositoryArchivaTaskScheduler;
 import org.apache.archiva.scheduler.repository.model.RepositoryTask;
 import org.apache.archiva.xml.XMLException;
index a86696ec5e9b1e522f441c6c4909b64e9672205c..4eed62261a22cbff3d251b3b954b5761aa9e6267 100644 (file)
@@ -30,7 +30,7 @@ import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataI
 import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataNotFoundException;
 import org.apache.archiva.metadata.repository.storage.RepositoryStorageRuntimeException;
 import org.apache.archiva.redback.components.cache.Cache;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
index 70f6cf0450dfe62b775b9925d3a4fed71aec2536..ddaacc9e1c9442e117b3fb298d5b7c1695a28837 100644 (file)
@@ -36,7 +36,7 @@ import org.apache.archiva.model.ArtifactReference;
 import org.apache.archiva.policies.ProxyDownloadException;
 import org.apache.archiva.repository.ManagedRepository;
 import org.apache.archiva.repository.ManagedRepositoryContent;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.apache.archiva.xml.XMLException;
 
 import java.io.IOException;
index d5c34b7ccc8d82ee31e2d0d66d7ebfca614df058..14f787884c2d4d99bc70d9fff9c72032ab170149 100644 (file)
@@ -26,7 +26,7 @@ import org.apache.archiva.metadata.repository.MetadataRepositoryException;
 import org.apache.archiva.metadata.repository.RepositorySession;
 import org.apache.archiva.metadata.repository.RepositorySessionFactory;
 import org.apache.archiva.metadata.repository.storage.RepositoryStorageMetadataException;
-import org.apache.archiva.repository.events.RepositoryListener;
+import org.apache.archiva.repository.event.RepositoryListener;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.stereotype.Service;