Interface IRepositoryReader
- All Known Subinterfaces:
IMasterRepository,IRepository
public interface IRepositoryReader
This interface represents a READ ONLY Repository. It allows for navigating through collections and resources.
-
Method Summary
Modifier and Type Method Description List<String>getAllResourcePaths()Returns a list of all the paths pointing to a resource.ICollectiongetCollection(String path)Returns anICollectioninstance representing the resource at the specified path.IResourcegetResource(String path)Returns an instance ofIResourcewhich represents the resource located at the specified path.ICollectiongetRoot()Returns an instance ofICollectionwhich represents the root collection of the repository.booleanhasCollection(String path)Returns whether a collection with the specified path exists in the repository.booleanhasResource(String path)Returns whether a resource with the specified path exists in the repository.voidinitialize()Performs initialization tasks.
-
Method Details
-
initialize
Performs initialization tasks.- Throws:
RepositoryInitializationException- in case of an error
-
getRoot
ICollection getRoot()Returns an instance ofICollectionwhich represents the root collection of the repository.This method does not throw any exceptions for convenience but is not guaranteed to return a valid collection.
- Returns:
- an
ICollectioninstance
-
getCollection
Returns anICollectioninstance representing the resource at the specified path.The collection may not exist at the specified path.
- Parameters:
path- theICollectionlocation- Returns:
- an
ICollectioninstance
-
hasCollection
Returns whether a collection with the specified path exists in the repository.- Parameters:
path- theICollectionlocation- Returns:
- whether the
ICollectionexists - Throws:
RepositoryReadException- in case the check cannot be performed
-
getResource
Returns an instance ofIResourcewhich represents the resource located at the specified path.The resource may not exist at the specified path.
-
hasResource
Returns whether a resource with the specified path exists in the repository.- Parameters:
path- theIResourcelocation- Returns:
- whether the
IResourceexists - Throws:
RepositoryReadException- in case the check cannot be performed
-
getAllResourcePaths
Returns a list of all the paths pointing to a resource.- Returns:
- a list of all the resources' paths
- Throws:
RepositoryReadException- in case of error
-