git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1423879 13f79535-47bb-0310-9956-ffa450edef68tags/archiva-1.4-M4
@@ -214,4 +214,10 @@ public class TestMetadataRepository | |||
throw new UnsupportedOperationException(); | |||
} | |||
public boolean hasMetadataFacet( String repositoryId, String facetId ) | |||
throws MetadataRepositoryException | |||
{ | |||
return false; | |||
} | |||
} |
@@ -64,6 +64,12 @@ public class MockRepositorySessionFactory | |||
return new MetadataRepository() | |||
{ | |||
public boolean hasMetadataFacet( String repositoryId, String facetId ) | |||
throws MetadataRepositoryException | |||
{ | |||
return false; | |||
} | |||
public void removeArtifact( String repositoryId, String namespace, String project, | |||
String projectVersion, MetadataFacet metadataFacet ) | |||
throws MetadataRepositoryException |
@@ -219,4 +219,9 @@ public class TestMetadataRepository | |||
throw new UnsupportedOperationException(); | |||
} | |||
public boolean hasMetadataFacet( String repositoryId, String facetId ) | |||
throws MetadataRepositoryException | |||
{ | |||
return false; | |||
} | |||
} |
@@ -64,6 +64,12 @@ public class MockRepositorySessionFactory | |||
return new MetadataRepository() | |||
{ | |||
public boolean hasMetadataFacet( String repositoryId, String facetId ) | |||
throws MetadataRepositoryException | |||
{ | |||
return false; | |||
} | |||
public void removeArtifact( ArtifactMetadata artifactMetadata, String baseVersion ) | |||
throws MetadataRepositoryException | |||
{ |
@@ -377,6 +377,11 @@ public class RepositoryContentConsumersTest | |||
this.invalidRepositoryContentConsumers = invalidRepositoryContentConsumers; | |||
} | |||
public String getApplicationName() | |||
{ | |||
return "foo"; | |||
} | |||
public AutowireCapableBeanFactory getAutowireCapableBeanFactory( ) | |||
throws IllegalStateException | |||
{ |
@@ -64,6 +64,12 @@ public class MockRepositorySessionFactory | |||
return new MetadataRepository() | |||
{ | |||
public boolean hasMetadataFacet( String repositoryId, String facetId ) | |||
throws MetadataRepositoryException | |||
{ | |||
return false; | |||
} | |||
public void removeArtifact( ArtifactMetadata artifactMetadata, String baseVersion ) | |||
throws MetadataRepositoryException | |||
{ |
@@ -234,6 +234,12 @@ public class NewArtifactsRssFeedProcessorTest | |||
throw new UnsupportedOperationException(); | |||
} | |||
public boolean hasMetadataFacet( String repositoryId, String facetId ) | |||
throws MetadataRepositoryException | |||
{ | |||
return false; | |||
} | |||
public void revert() | |||
{ | |||
throw new UnsupportedOperationException(); |
@@ -254,4 +254,10 @@ public class TestMetadataRepository | |||
throw new UnsupportedOperationException(); | |||
} | |||
public boolean hasMetadataFacet( String repositoryId, String facetId ) | |||
throws MetadataRepositoryException | |||
{ | |||
return false; | |||
} | |||
} |
@@ -215,4 +215,10 @@ public class TestMetadataRepository | |||
throw new UnsupportedOperationException(); | |||
} | |||
public boolean hasMetadataFacet( String repositoryId, String facetId ) | |||
throws MetadataRepositoryException | |||
{ | |||
return false; | |||
} | |||
} |
@@ -230,4 +230,10 @@ public class TestMetadataRepository | |||
throw new UnsupportedOperationException(); | |||
} | |||
public boolean hasMetadataFacet( String repositoryId, String facetId ) | |||
throws MetadataRepositoryException | |||
{ | |||
return false; | |||
} | |||
} |
@@ -309,6 +309,13 @@ public class FileMetadataRepository | |||
return facets; | |||
} | |||
public boolean hasMetadataFacet( String repositoryId, String facetId ) | |||
throws MetadataRepositoryException | |||
{ | |||
// TODO could be improved a bit | |||
return !getMetadataFacets( repositoryId, facetId ).isEmpty(); | |||
} | |||
private void recurse( List<String> facets, String prefix, File directory ) | |||
{ | |||
File[] list = directory.listFiles(); |
@@ -407,7 +407,7 @@ public class JcrMetadataRepository | |||
try | |||
{ | |||
Node node = getJcrSession().getRootNode().getNode( getFacetPath( repositoryId, facetId ) ); | |||
return JcrUtils.getChildNodes( node ).iterator().hasNext(); | |||
return node.getNodes().hasNext(); | |||
} | |||
catch ( PathNotFoundException e ) | |||
{ |