public interface Repository<T extends Identifiable>
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsObject(String id)
Find if an object is used in pages
|
void |
delete(String id)
Deletes component by its id
|
boolean |
exists(String id)
Return true if a component with provided id already exists in repository.
|
List<T> |
findByObjectId(String objectId)
Finds all pages which contains an object
|
Map<String,List<T>> |
findByObjectIds(List<String> objectIds)
Return a Map of object ids, with for each one all pages which contains this object
|
T |
get(String id)
Gets component by its id
|
List<T> |
getAll()
Get all the component in a directory
|
T |
getByUUID(String uuid)
Gets component by its uuid
Return null if the component does not Implement
HasUUID |
String |
getComponentName()
Return the component name
|
String |
getNextAvailableId(String name) |
T |
markAsFavorite(String id) |
Path |
resolvePath(String id)
Find the path file of a component linked with an id
|
Path |
resolvePathFolder(String id)
Path where the component files are saved
|
T |
save(T toBeSaved)
Save a component but without updating last update date
|
void |
saveAll(List<T> toBeSaved)
Save a list of component
|
T |
unmarkAsFavorite(String id) |
T |
updateLastUpdateAndSave(T toBeSaved)
Save a component
|
void |
walk(FileVisitor<? super Path> visitor) |
void |
watch(PathListener pathListener) |
T get(String id) throws NotFoundException, RepositoryException
NotFoundExceptionRepositoryExceptionT getByUUID(String uuid) throws NotFoundException, RepositoryException
HasUUIDNotFoundExceptionRepositoryExceptionList<T> getAll() throws RepositoryException
RepositoryExceptionT updateLastUpdateAndSave(T toBeSaved) throws RepositoryException
RepositoryExceptionT save(T toBeSaved) throws RepositoryException
RepositoryExceptionvoid saveAll(List<T> toBeSaved) throws RepositoryException
RepositoryExceptionvoid delete(String id) throws NotFoundException, RepositoryException
NotFoundExceptionRepositoryExceptionList<T> findByObjectId(String objectId) throws RepositoryException
RepositoryExceptionMap<String,List<T>> findByObjectIds(List<String> objectIds) throws RepositoryException
RepositoryExceptionboolean containsObject(String id)
RepositoryExceptionString getComponentName()
boolean exists(String id)
void walk(FileVisitor<? super Path> visitor) throws IOException
IOExceptionvoid watch(PathListener pathListener) throws IOException
IOExceptionString getNextAvailableId(String name) throws IOException
IOExceptionCopyright © 2020. All rights reserved.