summaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata/metadata-repository-api/src/main
diff options
context:
space:
mode:
authorBrett Porter <brett@apache.org>2010-03-09 04:24:32 +0000
committerBrett Porter <brett@apache.org>2010-03-09 04:24:32 +0000
commitaf2a929978a21ddd615ab84e3b1bb4ebe3c7f3b7 (patch)
tree10dce8d1df9091c234215bc5427de75d18c9ea76 /archiva-modules/metadata/metadata-repository-api/src/main
parent49eab5d3daab2ced8fb57f2abf63dffd91e14e43 (diff)
downloadarchiva-af2a929978a21ddd615ab84e3b1bb4ebe3c7f3b7.tar.gz
archiva-af2a929978a21ddd615ab84e3b1bb4ebe3c7f3b7.zip
[MNG-1301] remove the problem reports dependency on the repository layer, start to migrate path parsing into metadata API
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@920649 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata/metadata-repository-api/src/main')
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryPathTranslator.java7
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/repository/events/RepositoryListener.java33
2 files changed, 40 insertions, 0 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryPathTranslator.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryPathTranslator.java
index c877ec8ec..ee9358219 100644
--- a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryPathTranslator.java
+++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/storage/RepositoryPathTranslator.java
@@ -19,6 +19,8 @@ package org.apache.archiva.metadata.repository.storage;
* under the License.
*/
+import org.apache.archiva.metadata.model.ArtifactMetadata;
+
import java.io.File;
public interface RepositoryPathTranslator
@@ -32,4 +34,9 @@ public interface RepositoryPathTranslator
File toFile( File basedir, String namespace );
File toFile( File basedir, String namespace, String projectId, String projectVersion );
+
+ ArtifactMetadata getArtifactForPath( String repoId, String relativePath );
+
+ ArtifactMetadata getArtifactFromId( String repoId, String namespace, String projectId, String projectVersion,
+ String id );
}
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/repository/events/RepositoryListener.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/repository/events/RepositoryListener.java
new file mode 100644
index 000000000..2978d1a9b
--- /dev/null
+++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/repository/events/RepositoryListener.java
@@ -0,0 +1,33 @@
+package org.apache.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.
+ */
+
+/**
+ * Listen to events on the repository. This class is a stopgap
+ * refactoring measure until an event bus is in place to handle
+ * generic events such as these.
+ */
+public interface RepositoryListener
+{
+ /**
+ * Event for the deletion of a given artifact.
+ */
+ void deleteArtifact( String repositoryId, String namespace, String project, String version, String id );
+}