diff options
author | Olivier Lamy <olamy@apache.org> | 2014-11-17 10:43:06 +1100 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2014-11-17 10:43:06 +1100 |
commit | aa9bfe5eb39c08cf82d636768aaace39cbd42b7c (patch) | |
tree | d55ce2b95595984d638bf54d6464d0802c3d9e08 /archiva-modules/archiva-web/archiva-web-common | |
parent | 021bbaf5a142c5ebbc5b1f9c4d30cc1aa796506e (diff) | |
parent | 63479200cef1e242cdbdf19eb9474133959aac32 (diff) | |
download | archiva-aa9bfe5eb39c08cf82d636768aaace39cbd42b7c.tar.gz archiva-aa9bfe5eb39c08cf82d636768aaace39cbd42b7c.zip |
merge branch from Carlos. Thanks mate!!
Diffstat (limited to 'archiva-modules/archiva-web/archiva-web-common')
-rw-r--r-- | archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java | 191 |
1 files changed, 4 insertions, 187 deletions
diff --git a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java index 32c43f12d..070c949f0 100644 --- a/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java +++ b/archiva-modules/archiva-web/archiva-web-common/src/test/java/org/apache/archiva/webtest/memory/TestMetadataRepository.java @@ -19,22 +19,17 @@ package org.apache.archiva.webtest.memory; * under the License. */ -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; -import org.apache.archiva.metadata.repository.MetadataRepository; -import org.apache.archiva.metadata.repository.MetadataRepositoryException; - import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Date; import java.util.List; +import org.apache.archiva.metadata.model.ArtifactMetadata; +import org.apache.archiva.metadata.repository.AbstractMetadataRepository; + public class TestMetadataRepository - implements MetadataRepository + extends AbstractMetadataRepository { private static final String TEST_REPO = "test-repo"; @@ -75,107 +70,18 @@ public class TestMetadataRepository } @Override - public ProjectMetadata getProject( String repoId, String namespace, String projectId ) - { - throw new UnsupportedOperationException(); - } - - @Override - public ProjectVersionMetadata getProjectVersion( String repoId, String namespace, String projectId, - String projectVersion ) - { - throw new UnsupportedOperationException(); - } - - @Override - public Collection<String> getArtifactVersions( String repoId, String namespace, String projectId, - String projectVersion ) - { - throw new UnsupportedOperationException(); - } - - @Override - public Collection<ProjectVersionReference> getProjectReferences( String repoId, String namespace, String projectId, - String projectVersion ) - { - throw new UnsupportedOperationException(); - } - - @Override - public Collection<String> getRootNamespaces( String repoId ) - { - throw new UnsupportedOperationException(); - } - - @Override - public Collection<String> getNamespaces( String repoId, String namespace ) - { - throw new UnsupportedOperationException(); - } - - @Override - public Collection<String> getProjects( String repoId, String namespace ) - { - throw new UnsupportedOperationException(); - } - - @Override public Collection<String> getProjectVersions( String repoId, String namespace, String projectId ) { return versions; } @Override - public void updateProject( String repoId, ProjectMetadata project ) - { - throw new UnsupportedOperationException(); - } - - @Override - public void updateArtifact( String repoId, String namespace, String projectId, String projectVersion, - ArtifactMetadata artifactMeta ) - { - throw new UnsupportedOperationException(); - } - - @Override - public void updateProjectVersion( String repoId, String namespace, String projectId, - ProjectVersionMetadata versionMetadata ) - { - throw new UnsupportedOperationException(); - } - - @Override - public void updateNamespace( String repoId, String namespace ) - { - throw new UnsupportedOperationException(); - } - - @Override public List<String> getMetadataFacets( String repodId, String facetId ) { return Collections.emptyList(); } @Override - public MetadataFacet getMetadataFacet( String repositoryId, String facetId, String name ) - { - throw new UnsupportedOperationException(); - } - - @Override - public void addMetadataFacet( String repositoryId, MetadataFacet metadataFacet ) - { - throw new UnsupportedOperationException(); - } - - @Override - public void removeMetadataFacets( String repositoryId, String facetId ) - { - throw new UnsupportedOperationException(); - } - - @Override public void removeMetadataFacet( String repoId, String facetId, String name ) { //To change body of implemented methods use File | Settings | File Templates. @@ -194,32 +100,6 @@ public class TestMetadataRepository } @Override - public List<ArtifactMetadata> getArtifactsByChecksum( String repoId, String checksum ) - { - return null; - } - - @Override - public void removeArtifact( String repositoryId, String namespace, String project, String version, String id ) - { - 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 repoId ) - { - throw new UnsupportedOperationException(); - } - - @Override public Collection<ArtifactMetadata> getArtifacts( String repoId, String namespace, String projectId, String projectVersion ) { @@ -227,72 +107,9 @@ public class TestMetadataRepository } @Override - public void save() - { - } - - @Override - public void close() - { - } - - @Override - public void revert() - { - throw new UnsupportedOperationException(); - } - - @Override - public boolean canObtainAccess( Class<?> aClass ) - { - return false; - } - - @Override - public <T>T obtainAccess( Class<T> aClass ) - { - return null; - } - - @Override public List<ArtifactMetadata> getArtifacts( String repositoryId ) { return artifacts; } - @Override - public void removeArtifact( ArtifactMetadata artifactMetadata, String baseVersion ) - throws MetadataRepositoryException - { - throw new UnsupportedOperationException(); - } - - @Override - public void removeNamespace( String repositoryId, String namespace ) - throws MetadataRepositoryException - { - - } - - @Override - public void removeProjectVersion( String repoId, String namespace, String projectId, String projectVersion ) - throws MetadataRepositoryException - { - - } - - @Override - public void removeProject( String repositoryId, String namespace, String projectId ) - throws MetadataRepositoryException - { - throw new UnsupportedOperationException(); - } - - - @Override - public boolean hasMetadataFacet( String repositoryId, String facetId ) - throws MetadataRepositoryException - { - return false; - } }
\ No newline at end of file |