@@ -204,9 +204,10 @@ public interface ManagedRepositoryContent extends RepositoryContent | |||
* given namespace. | |||
* | |||
* @param namespace the namespace, which is the parent namespace | |||
* @param recurse <code>true</code>, if all sub namespaces should be searched too, otherwise <code>false</code> | |||
* @return a list of artifacts or a empty list, if no artifacts are available for the specified namespace | |||
*/ | |||
List<? extends Artifact> getArtifactsStartingWith( Namespace namespace ) throws ContentAccessException; | |||
List<? extends Artifact> getArtifacts( Namespace namespace, boolean recurse ) throws ContentAccessException; | |||
/** | |||
@@ -231,10 +232,11 @@ public interface ManagedRepositoryContent extends RepositoryContent | |||
* make sure, that the stream is closed after using it. | |||
* | |||
* @param namespace the namespace from where the artifacts should be returned | |||
* @param recurse <code>true</code>, if all sub namespaces should be searched too, otherwise <code>false</code> | |||
* @return a stream of artifacts. The stream is auto closable. You should always make sure, that the stream | |||
* is closed after use. | |||
*/ | |||
Stream<? extends Artifact> getArtifactStreamStartingWith( Namespace namespace ) throws ContentAccessException; | |||
Stream<? extends Artifact> getArtifactStream( Namespace namespace, boolean recurse ) throws ContentAccessException; | |||
/** | |||
@@ -252,10 +254,27 @@ public interface ManagedRepositoryContent extends RepositoryContent | |||
* @param destination the coordinates of the destination | |||
* @throws IllegalArgumentException if the destination is not valid | |||
*/ | |||
void copyArtifact( Path sourceFile, ItemSelector destination ) throws IllegalArgumentException; | |||
void copyArtifact( Path sourceFile, ContentItem destination ) throws IllegalArgumentException; | |||
/** | |||
* Returns the item that matches the given path. The item at the path must not exist. | |||
* | |||
* @param path the path string that points to the item | |||
* @return the content item if the path is a valid item path | |||
* @throws LayoutException if the path is not valid for the repository layout | |||
*/ | |||
ContentItem toItem(String path) throws LayoutException; | |||
/** | |||
* Returns the item that matches the given asset path. The asset must not exist. | |||
* | |||
* @param assetPath the path to the artifact or directory | |||
* @return the item, if it is a valid path for the repository layout | |||
* @throws LayoutException if the path is not valid for the repository | |||
*/ | |||
ContentItem toItem(StorageAsset assetPath) throws LayoutException; | |||
/// ***************** End of new generation interface ********************** |
@@ -151,7 +151,7 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent | |||
} | |||
@Override | |||
public List<? extends Artifact> getArtifactsStartingWith( Namespace namespace ) throws ContentAccessException | |||
public List<? extends Artifact> getArtifacts( Namespace namespace, boolean recurse ) throws ContentAccessException | |||
{ | |||
return null; | |||
} | |||
@@ -163,7 +163,7 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent | |||
} | |||
@Override | |||
public Stream<? extends Artifact> getArtifactStreamStartingWith( Namespace namespace ) throws ContentAccessException | |||
public Stream<? extends Artifact> getArtifactStream( Namespace namespace, boolean recurse ) throws ContentAccessException | |||
{ | |||
return null; | |||
} | |||
@@ -175,7 +175,7 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent | |||
} | |||
@Override | |||
public void copyArtifact( Path sourceFile, ItemSelector destination ) throws IllegalArgumentException | |||
public void copyArtifact( Path sourceFile, ContentItem destination ) throws IllegalArgumentException | |||
{ | |||
} |
@@ -152,7 +152,7 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent | |||
} | |||
@Override | |||
public List<? extends Artifact> getArtifactsStartingWith( Namespace namespace ) throws ContentAccessException | |||
public List<? extends Artifact> getArtifacts( Namespace namespace, boolean recurse ) throws ContentAccessException | |||
{ | |||
return null; | |||
} | |||
@@ -164,7 +164,7 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent | |||
} | |||
@Override | |||
public Stream<? extends Artifact> getArtifactStreamStartingWith( Namespace namespace ) throws ContentAccessException | |||
public Stream<? extends Artifact> getArtifactStream( Namespace namespace, boolean recurse ) throws ContentAccessException | |||
{ | |||
return null; | |||
} | |||
@@ -176,7 +176,7 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent | |||
} | |||
@Override | |||
public void copyArtifact( Path sourceFile, ItemSelector destination ) throws IllegalArgumentException | |||
public void copyArtifact( Path sourceFile, ContentItem destination ) throws IllegalArgumentException | |||
{ | |||
} |
@@ -156,7 +156,7 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent | |||
} | |||
@Override | |||
public List<? extends Artifact> getArtifactsStartingWith( Namespace namespace ) throws ContentAccessException | |||
public List<? extends Artifact> getArtifacts( Namespace namespace, boolean recurse ) throws ContentAccessException | |||
{ | |||
return null; | |||
} | |||
@@ -168,7 +168,7 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent | |||
} | |||
@Override | |||
public Stream<? extends Artifact> getArtifactStreamStartingWith( Namespace namespace ) throws ContentAccessException | |||
public Stream<? extends Artifact> getArtifactStream( Namespace namespace, boolean recurse ) throws ContentAccessException | |||
{ | |||
return null; | |||
} | |||
@@ -180,7 +180,7 @@ public class ManagedRepositoryContentMock implements ManagedRepositoryContent | |||
} | |||
@Override | |||
public void copyArtifact( Path sourceFile, ItemSelector destination ) throws IllegalArgumentException | |||
public void copyArtifact( Path sourceFile, ContentItem destination ) throws IllegalArgumentException | |||
{ | |||
} |
@@ -600,7 +600,7 @@ public class ManagedDefaultRepositoryContent | |||
TBD | |||
*/ | |||
@Override | |||
public List<? extends Artifact> getArtifactsStartingWith( Namespace namespace ) | |||
public List<? extends Artifact> getArtifacts( Namespace namespace, boolean recurse ) | |||
{ | |||
return null; | |||
} | |||
@@ -618,7 +618,7 @@ public class ManagedDefaultRepositoryContent | |||
TBD | |||
*/ | |||
@Override | |||
public Stream<? extends Artifact> getArtifactStreamStartingWith( Namespace namespace ) | |||
public Stream<? extends Artifact> getArtifactStream( Namespace namespace, boolean recurse ) | |||
{ | |||
return null; | |||
} | |||
@@ -636,11 +636,29 @@ public class ManagedDefaultRepositoryContent | |||
TBD | |||
*/ | |||
@Override | |||
public void copyArtifact( Path sourceFile, ItemSelector destination ) throws IllegalArgumentException | |||
public void copyArtifact( Path sourceFile, ContentItem destination ) throws IllegalArgumentException | |||
{ | |||
} | |||
/** | |||
* TBD | |||
* @param path the path string that points to the item | |||
* @return | |||
* @throws LayoutException | |||
*/ | |||
@Override | |||
public ContentItem toItem( String path ) throws LayoutException | |||
{ | |||
return getItemFromPath( getAssetByPath( path ) ); | |||
} | |||
@Override | |||
public ContentItem toItem( StorageAsset assetPath ) throws LayoutException | |||
{ | |||
return getItemFromPath( assetPath ); | |||
} | |||
@Override | |||
public void deleteVersion( VersionedReference ref ) throws ContentNotFoundException, ContentAccessException | |||
{ |