1 package org.apache.archiva.repository.maven.mock;
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
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
21 import org.apache.archiva.metadata.model.ArtifactMetadata;
22 import org.apache.archiva.metadata.model.ProjectVersionMetadata;
23 import org.apache.archiva.metadata.model.ProjectVersionReference;
24 import org.apache.archiva.metadata.repository.MetadataResolutionException;
25 import org.apache.archiva.metadata.repository.MetadataResolver;
26 import org.apache.archiva.metadata.repository.RepositorySession;
27 import org.springframework.stereotype.Service;
29 import java.util.Collection;
31 // FIXME: remove - this is useless, better to mock it or avoid needing it
32 @Service( "metadataResolver#test" )
33 public class TestMetadataResolver
34 implements MetadataResolver
37 public ProjectVersionMetadata resolveProjectVersion( RepositorySession session, String repoId, String namespace,
38 String projectId, String projectVersion )
39 throws MetadataResolutionException
45 public Collection<ProjectVersionReference> resolveProjectReferences( RepositorySession session, String repoId,
46 String namespace, String projectId,
47 String projectVersion )
48 throws MetadataResolutionException
54 public Collection<String> resolveRootNamespaces( RepositorySession session, String repoId )
55 throws MetadataResolutionException
61 public Collection<String> resolveNamespaces( RepositorySession session, String repoId, String namespace )
62 throws MetadataResolutionException
68 public Collection<String> resolveProjects( RepositorySession session, String repoId, String namespace )
69 throws MetadataResolutionException
75 public Collection<String> resolveProjectVersions( RepositorySession session, String repoId, String namespace,
77 throws MetadataResolutionException
83 public Collection<ArtifactMetadata> resolveArtifacts( RepositorySession session, String repoId, String namespace,
84 String projectId, String projectVersion )
85 throws MetadataResolutionException