summaryrefslogtreecommitdiffstats
path: root/archiva-modules/metadata
diff options
context:
space:
mode:
authorCarlos Sanchez <csanchez@maestrodev.com>2014-11-06 09:58:02 +0100
committerCarlos Sanchez <csanchez@maestrodev.com>2014-11-06 13:39:28 +0100
commit63479200cef1e242cdbdf19eb9474133959aac32 (patch)
tree5ecfb21a00562d8ad0a6086bb695dcd5e8c0ace1 /archiva-modules/metadata
parentae9b10930639f230ebbc017d0a78d7e95b5a42ae (diff)
downloadarchiva-63479200cef1e242cdbdf19eb9474133959aac32.tar.gz
archiva-63479200cef1e242cdbdf19eb9474133959aac32.zip
Add a AbstractMetadataRepository to remove duplicated code
Diffstat (limited to 'archiva-modules/metadata')
-rw-r--r--archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/AbstractMetadataRepository.java280
1 files changed, 280 insertions, 0 deletions
diff --git a/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/AbstractMetadataRepository.java b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/AbstractMetadataRepository.java
new file mode 100644
index 000000000..7372229bd
--- /dev/null
+++ b/archiva-modules/metadata/metadata-repository-api/src/main/java/org/apache/archiva/metadata/repository/AbstractMetadataRepository.java
@@ -0,0 +1,280 @@
+package org.apache.archiva.metadata.repository;
+
+/*
+* 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.
+*/
+
+import java.util.Collection;
+import java.util.Date;
+import java.util.List;
+
+import org.apache.archiva.metadata.model.ArtifactMetadata;
+import org.apache.archiva.metadata.model.MetadataFacet;
+import org.apache.archiva.metadata.model.ProjectMetadata;
+import org.apache.archiva.metadata.model.ProjectVersionMetadata;
+import org.apache.archiva.metadata.model.ProjectVersionReference;
+
+public abstract class AbstractMetadataRepository
+ implements MetadataRepository
+{
+
+ @Override
+ public void updateProject( String repositoryId, ProjectMetadata project )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void updateArtifact( String repositoryId, String namespace, String projectId, String projectVersion,
+ ArtifactMetadata artifactMeta )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void updateProjectVersion( String repositoryId, String namespace, String projectId,
+ ProjectVersionMetadata versionMetadata )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void updateNamespace( String repositoryId, String namespace )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public List<String> getMetadataFacets( String repositoryId, String facetId )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean hasMetadataFacet( String repositoryId, String facetId )
+ throws MetadataRepositoryException
+ {
+ return false;
+ }
+
+ @Override
+ public MetadataFacet getMetadataFacet( String repositoryId, String facetId, String name )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void addMetadataFacet( String repositoryId, MetadataFacet metadataFacet )
+ throws MetadataRepositoryException
+ {
+ }
+
+ @Override
+ public void removeMetadataFacets( String repositoryId, String facetId )
+ throws MetadataRepositoryException
+ {
+ }
+
+ @Override
+ public void removeMetadataFacet( String repositoryId, String facetId, String name )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public List<ArtifactMetadata> getArtifactsByDateRange( String repositoryId, Date startTime, Date endTime )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Collection<String> getRepositories()
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Collection<ArtifactMetadata> getArtifactsByChecksum( String repositoryId, String checksum )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void removeArtifact( String repositoryId, String namespace, String project, String version, String id )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void removeArtifact( ArtifactMetadata artifactMetadata, String baseVersion )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void removeArtifact( String repositoryId, String namespace, String project, String version,
+ MetadataFacet metadataFacet )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void removeRepository( String repositoryId )
+ throws MetadataRepositoryException
+ {
+ }
+
+ @Override
+ public void removeNamespace( String repositoryId, String namespace )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+
+ }
+
+ @Override
+ public List<ArtifactMetadata> getArtifacts( String repositoryId )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public ProjectMetadata getProject( String repoId, String namespace, String projectId )
+ throws MetadataResolutionException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public ProjectVersionMetadata getProjectVersion( String repoId, String namespace, String projectId,
+ String projectVersion )
+ throws MetadataResolutionException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Collection<String> getArtifactVersions( String repoId, String namespace, String projectId,
+ String projectVersion )
+ throws MetadataResolutionException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Collection<ProjectVersionReference> getProjectReferences( String repoId, String namespace, String projectId,
+ String projectVersion )
+ throws MetadataResolutionException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Collection<String> getRootNamespaces( String repoId )
+ throws MetadataResolutionException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Collection<String> getNamespaces( String repoId, String namespace )
+ throws MetadataResolutionException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Collection<String> getProjects( String repoId, String namespace )
+ throws MetadataResolutionException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Collection<String> getProjectVersions( String repoId, String namespace, String projectId )
+ throws MetadataResolutionException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void removeProjectVersion( String repoId, String namespace, String projectId, String projectVersion )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Collection<ArtifactMetadata> getArtifacts( String repoId, String namespace, String projectId,
+ String projectVersion )
+ throws MetadataResolutionException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void removeProject( String repositoryId, String namespace, String projectId )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void save()
+ {
+ }
+
+ @Override
+ public void close()
+ throws MetadataRepositoryException
+ {
+ }
+
+ @Override
+ public void revert()
+ {
+ }
+
+ @Override
+ public boolean canObtainAccess( Class<?> aClass )
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public <T> T obtainAccess( Class<T> aClass )
+ throws MetadataRepositoryException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+}