summaryrefslogtreecommitdiffstats
path: root/archiva-modules/archiva-base/archiva-repository-layer
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2008-12-02 13:02:37 +0000
committerBrett Porter <brett@apache.org>2008-12-02 13:02:37 +0000
commit8946eb16818609f9b23d52b3a5ab8c3e861b2f22 (patch)
treefa455dfa8ce40760dd23e292fbe613bf4a2a97fc /archiva-modules/archiva-base/archiva-repository-layer
parent17ffc555fcebf3413768f3e05981ff589bcb33f6 (diff)
downloadarchiva-8946eb16818609f9b23d52b3a5ab8c3e861b2f22.tar.gz
archiva-8946eb16818609f9b23d52b3a5ab8c3e861b2f22.zip
[MRM-1027] Indices are not cleaned up when deleting artifact via web services
Merged from: r722439 git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@722449 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base/archiva-repository-layer')
-rw-r--r--archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/events/RepositoryListenerFactoryBean.java63
1 files changed, 63 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/events/RepositoryListenerFactoryBean.java b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/events/RepositoryListenerFactoryBean.java
new file mode 100644
index 000000000..b4d16b16d
--- /dev/null
+++ b/archiva-modules/archiva-base/archiva-repository-layer/src/main/java/org/apache/maven/archiva/repository/events/RepositoryListenerFactoryBean.java
@@ -0,0 +1,63 @@
+package org.apache.maven.archiva.repository.events;
+
+/*
+ * 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 java.util.List;
+
+import org.apache.maven.archiva.consumers.InvalidRepositoryContentConsumer;
+import org.springframework.beans.BeansException;
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.context.ApplicationContext;
+import org.springframework.context.ApplicationContextAware;
+
+/**
+ * @todo though we will eventually remove this altogether, an interim cleanup would be to genericise this
+ * and replace the calls in RepositoryContentConsumers with calls to the same thing
+ */
+public class RepositoryListenerFactoryBean
+ implements FactoryBean, ApplicationContextAware
+{
+
+ private ApplicationContext applicationContext;
+
+ public void setApplicationContext( ApplicationContext applicationContext )
+ throws BeansException
+ {
+ this.applicationContext = applicationContext;
+ }
+
+ public Object getObject()
+ throws Exception
+ {
+ return applicationContext.getBeansOfType( RepositoryListener.class ).values();
+ }
+
+ public Class getObjectType()
+ {
+ return List.class;
+ }
+
+ public boolean isSingleton()
+ {
+ return true;
+ }
+
+
+}