public interface ResourcesI extends Serializable
Usually this will be an attachment but it may also be an image resource or some other type of downloadable resource.
Resources are stored within folders which can be located anywhere in the hierarchy but MUST NOT be calendar collections. This allows us to remain compliant with CalDAV.
| Modifier and Type | Method and Description |
|---|---|
boolean |
copyMove(BwResource val,
String to,
String name,
boolean copy,
boolean overwrite)
Move or copy the given resource to the destination collection.
|
void |
delete(String path)
Delete a resource and content given the path
|
BwResource |
get(String path)
Get a resource given the path - does not get content
|
List<BwResource> |
get(String path,
int count)
Get resources to which this user has access - content is not fetched.
|
List<BwResource> |
getAll(String path)
Get resources to which this user has access - content is not fetched.
|
void |
getContent(BwResource val)
Retrieve resource content given the resource.
|
int[] |
reindex(BwIndexer indexer,
BwIndexer contentIndexer,
BwIndexer collectionIndexer)
Reindex current users entities
|
boolean |
save(BwResource val,
boolean returnIfExists)
Save a resource.
|
boolean |
saveNotification(BwResource val)
Save a notification resource.
|
void |
update(BwResource val,
boolean updateContent)
Update a resource.
|
boolean save(BwResource val, boolean returnIfExists) throws CalFacadeException
val - resource with attached contentreturnIfExists - false to throw an exceptionCalFacadeException - for errors including duplicate nameboolean saveNotification(BwResource val) throws CalFacadeException
val - resource with attached contentCalFacadeException - for errors including duplicate nameBwResource get(String path) throws CalFacadeException
path - String path to resourceCalFacadeException - on fatal errorvoid getContent(BwResource val) throws CalFacadeException
val - BwResourceCalFacadeException - on fatal errorList<BwResource> getAll(String path) throws CalFacadeException
path - String path to containing collectionCalFacadeException - on fatal errorList<BwResource> get(String path, int count) throws CalFacadeException
path - String path to containing collectioncount - this manyCalFacadeException - on fatal errorvoid update(BwResource val, boolean updateContent) throws CalFacadeException
val - resourceupdateContent - if true we also update the contentCalFacadeException - for errors including duplicate namevoid delete(String path) throws CalFacadeException
path - String path to resourceCalFacadeException - on fatal errorboolean copyMove(BwResource val, String to, String name, boolean copy, boolean overwrite) throws CalFacadeException
val - BwResourceto - Path of estination collectionname - String name of new entitycopy - true for copyingoverwrite - destination existsCalFacadeException - on fatal errorint[] reindex(BwIndexer indexer, BwIndexer contentIndexer, BwIndexer collectionIndexer) throws CalFacadeException
indexer - to use for this operationcontentIndexer - to use for this operationcollectionIndexer - to use for this operationCalFacadeException - on fatal errorCopyright © 2019 Bedework. All rights reserved.