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 org.apache.archiva.metadata.model.ArtifactMetadata;
23 import org.apache.archiva.metadata.model.MetadataFacet;
24 import org.apache.archiva.metadata.model.ProjectMetadata;
25 import org.apache.archiva.metadata.model.ProjectVersionMetadata;
26 import org.apache.archiva.metadata.model.ProjectVersionReference;
27 import org.springframework.stereotype.Service;
29 import java.util.Collection;
30 import java.util.Collections;
31 import java.util.Date;
32 import java.util.List;
34 // TODO: remove, it does nothing
37 public class TestMetadataRepository
38 implements MetadataRepository
40 public ProjectMetadata getProject( String repoId, String namespace, String projectId )
45 public ProjectVersionMetadata getProjectVersion( String repoId, String namespace, String projectId,
46 String projectVersion )
51 public Collection<String> getArtifactVersions( String repoId, String namespace, String projectId,
52 String projectVersion )
54 return Collections.emptyList();
57 public Collection<ProjectVersionReference> getProjectReferences( String repoId, String namespace, String projectId,
58 String projectVersion )
60 return Collections.emptyList();
63 public Collection<String> getRootNamespaces( String repoId )
65 return Collections.emptyList();
68 public Collection<String> getNamespaces( String repoId, String namespace )
70 return Collections.emptyList();
73 public Collection<String> getProjects( String repoId, String namespace )
75 return Collections.emptyList();
78 public Collection<String> getProjectVersions( String repoId, String namespace, String projectId )
80 return Collections.emptyList();
83 public void updateProject( String repoId, ProjectMetadata project )
88 public void updateArtifact( String repoId, String namespace, String projectId, String projectVersion,
89 ArtifactMetadata artifactMeta )
94 public void updateProjectVersion( String repoId, String namespace, String projectId,
95 ProjectVersionMetadata versionMetadata )
100 public void updateNamespace( String repoId, String namespace )
105 public List<String> getMetadataFacets( String repodId, String facetId )
107 return Collections.emptyList();
110 public MetadataFacet getMetadataFacet( String repositoryId, String facetId, String name )
115 public void addMetadataFacet( String repositoryId, MetadataFacet metadataFacet )
120 public void removeMetadataFacets( String repositoryId, String facetId )
125 public void removeMetadataFacet( String repoId, String facetId, String name )
130 public List<ArtifactMetadata> getArtifactsByDateRange( String repoId, Date startTime, Date endTime )
132 return Collections.emptyList();
135 public Collection<String> getRepositories()
137 return Collections.emptyList();
140 public List<ArtifactMetadata> getArtifactsByChecksum( String repoId, String checksum )
142 return Collections.emptyList();
145 public void removeArtifact( String repositoryId, String namespace, String project, String version, String id )
150 public void removeRepository( String repoId )
155 public Collection<ArtifactMetadata> getArtifacts( String repoId, String namespace, String projectId,
156 String projectVersion )
158 return Collections.emptyList();
176 public boolean canObtainAccess( Class<?> aClass )
181 public Object obtainAccess( Class<?> aClass )
183 return null; //To change body of implemented methods use File | Settings | File Templates.
186 public List<ArtifactMetadata> getArtifacts( String repositoryId )
188 return Collections.emptyList();
191 public void removeArtifact( String repositoryId, String namespace, String project, String version,
192 MetadataFacet metadataFacet )
193 throws MetadataRepositoryException
195 throw new UnsupportedOperationException();
198 public void removeArtifact( ArtifactMetadata artifactMetadata, String baseVersion )
199 throws MetadataRepositoryException
201 throw new UnsupportedOperationException();
204 public void removeNamespace( String repositoryId, String namespace )
205 throws MetadataRepositoryException
210 public void removeProjectVersion( String repoId, String namespace, String projectId, String projectVersion )
211 throws MetadataRepositoryException
216 public void removeProject( String repositoryId, String namespace, String projectId )
217 throws MetadataRepositoryException
219 throw new UnsupportedOperationException();
222 public boolean hasMetadataFacet( String repositoryId, String facetId )
223 throws MetadataRepositoryException