1 package org.apache.archiva.metadata.repository;
4 * Licensed to the Apache Software Foundation (ASF) under one
5 * or more contributor license agreements. See the NOTICE file
6 * distributed with this work for additional information
7 * regarding copyright ownership. The ASF licenses this file
8 * to you under the Apache License, Version 2.0 (the
9 * "License"); you may not use this file except in compliance
10 * with the License. You may obtain a copy of the License at
12 * http://www.apache.org/licenses/LICENSE-2.0
14 * Unless required by applicable law or agreed to in writing,
15 * software distributed under the License is distributed on an
16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 * KIND, either express or implied. See the License for the
18 * specific language governing permissions and limitations
22 import java.util.Collection;
24 import org.apache.archiva.metadata.model.ArtifactMetadata;
25 import org.apache.archiva.metadata.model.ProjectMetadata;
26 import org.apache.archiva.metadata.model.ProjectVersionMetadata;
27 import org.apache.archiva.metadata.model.ProjectVersionReference;
29 public interface MetadataResolver
31 ProjectMetadata getProject( String repoId, String namespace, String projectId );
33 ProjectVersionMetadata getProjectVersion( String repoId, String namespace, String projectId, String projectVersion )
34 throws MetadataResolverException;
36 Collection<String> getArtifactVersions( String repoId, String namespace, String projectId, String projectVersion );
39 * Retrieve project references from the metadata repository. Note that this is not built into the content model for
40 * a project version as a reference may be present (due to reverse-lookup of dependencies) before the actual
41 * project is, and we want to avoid adding a stub model to the content repository.
43 * @param repoId the repository ID to look within
44 * @param namespace the namespace of the project to get references to
45 * @param projectId the identifier of the project to get references to
46 * @param projectVersion the version of the project to get references to
47 * @return a list of project references
49 Collection<ProjectVersionReference> getProjectReferences( String repoId, String namespace, String projectId,
50 String projectVersion );
52 Collection<String> getRootNamespaces( String repoId );
54 Collection<String> getNamespaces( String repoId, String namespace );
56 Collection<String> getProjects( String repoId, String namespace );
58 Collection<String> getProjectVersions( String repoId, String namespace, String projectId )
59 throws MetadataResolverException;
61 Collection<ArtifactMetadata> getArtifacts( String repoId, String namespace, String projectId,
62 String projectVersion );