1package org.apache.archiva.metadata.repository;
23/*4 * Licensed to the Apache Software Foundation (ASF) under one5 * or more contributor license agreements. See the NOTICE file6 * distributed with this work for additional information7 * regarding copyright ownership. The ASF licenses this file8 * to you under the Apache License, Version 2.0 (the9 * "License"); you may not use this file except in compliance10 * with the License. You may obtain a copy of the License at11 *12 * http://www.apache.org/licenses/LICENSE-2.013 *14 * Unless required by applicable law or agreed to in writing,15 * software distributed under the License is distributed on an16 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY17 * KIND, either express or implied. See the License for the18 * specific language governing permissions and limitations19 * under the License.20 */2122import org.apache.archiva.metadata.model.ArtifactMetadata;
23import org.apache.archiva.metadata.model.ProjectVersionMetadata;
24import org.apache.archiva.metadata.model.ProjectVersionReference;
25import org.apache.archiva.repository.Repository;
26import org.apache.archiva.repository.RepositoryType;
2728import java.util.Arrays;
29import java.util.Collection;
30import java.util.List;
3132publicinterfaceMetadataResolver33 {
34default List<RepositoryType> supportsRepositoryTypes() {
35return Arrays.asList( RepositoryType.MAVEN );
36 }
3738ProjectVersionMetadata resolveProjectVersion( RepositorySession session, String repoId, String namespace,
39 String projectId, String projectVersion )
40throws MetadataResolutionException;
4142/**43 * Retrieve project references from the metadata repository. Note that this is not built into the content model for44 * a project version as a reference may be present (due to reverse-lookup of dependencies) before the actual45 * project is, and we want to avoid adding a stub model to the content repository.46 *47 * @param repoId the repository ID to look within48 * @param namespace the namespace of the project to get references to49 * @param projectId the identifier of the project to get references to50 * @param projectVersion the version of the project to get references to51 * @return a list of project references52 */53 Collection<ProjectVersionReference> resolveProjectReferences( RepositorySession session, String repoId,
54 String namespace, String projectId,
55 String projectVersion )
56throws MetadataResolutionException;
5758 Collection<String> resolveRootNamespaces( RepositorySession session, String repoId )
59throws MetadataResolutionException;
6061 Collection<String> resolveNamespaces( RepositorySession session, String repoId, String namespace )
62throws MetadataResolutionException;
6364 Collection<String> resolveProjects( RepositorySession session, String repoId, String namespace )
65throws MetadataResolutionException;
6667 Collection<String> resolveProjectVersions( RepositorySession session, String repoId, String namespace,
68 String projectId )
69throws MetadataResolutionException;
7071 Collection<ArtifactMetadata> resolveArtifacts( RepositorySession session, String repoId, String namespace,
72 String projectId, String projectVersion )
73throws MetadataResolutionException;
74 }