Interface ResourceService
- All Superinterfaces:
- Serializable
- All Known Implementing Classes:
- ResourceServiceImpl
All CRUD as well as versioning functionalities against logicalDOC will be
 handled through this service pattern. Therefore it is called the most
 common-class where changes must be done during the time. Security mechanism
 are also implemented through every method. Therefore the caller
 (WebDAV-Implementation) has just pass the required path or
- Author:
- Sebastian Wenzky
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddBookmark(Resource resource, WebdavSession session) voidcheckout(Resource resource, WebdavSession session) Versioning-part.voidcopy(Resource source, Resource destination, String newName, WebdavSession session) Copying of a resource within logicalDOC.createResource(Resource parentResource, String name, boolean isCollection, ImportContext context, WebdavSession session) Handle of resource creation by passed parent resource as well as the most import parameters needed for a resource creation.voiddeleteBookmark(Resource resource, WebdavSession session) voiddeleteResource(Resource resource, WebdavSession session) Deletion of a resource within logicalDOC.getChildByName(Resource parentResource, String name) Based on the parent resource it will be tried to get a child by a specific namegetChildResources(Resource parentResource) On passing a validgetHistory(Resource resource) Versioning-part.getParentResource(Resource resource) Based on the current resource location it will be turned back the upper resourcegetParentResource(String location, long userId, WebdavSession session) Based on a location pathgetResource(String location, WebdavSession session) On passing a location as well as the current session you gettin back the appropriated resource.move(Resource target, Resource destination, String newName, WebdavSession session) Moves a resource named target to the folder dictionary destinationGets the stream for a resourcevoiduncheckout(Resource resource, WebdavSession session) Cancels a checkoutvoidupdateResource(Resource resource, ImportContext context, WebdavSession session) Updating a resource on passing all new properties though a valid resource object.
- 
Method Details- 
getResourceResource getResource(String location, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException On passing a location as well as the current session you gettin back the appropriated resource.- Parameters:
- location- The location retrieved through (@see DavResourceLocator#getResourcePath())
- session- The current session
- Returns:
- the DAV resource
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
getChildResourcesList<Resource> getChildResources(Resource parentResource) throws org.apache.jackrabbit.webdav.DavException On passing a valid- Parameters:
- parentResource- The resource(mostly a folder) from which are all direct childs has to be fetched and turned back s
- Returns:
- direct childs of the parent resource
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
- See Also:
 
- 
createResourceResource createResource(Resource parentResource, String name, boolean isCollection, ImportContext context, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException Handle of resource creation by passed parent resource as well as the most import parameters needed for a resource creation.- Parameters:
- parentResource- The parent resource(mostly a folder)
- name- the filename and titlename of the child
- isCollection- is the resource folder?
- context- for inputstream
- session- the current session
- Returns:
- the newly created Resource
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
updateResourcevoid updateResource(Resource resource, ImportContext context, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException Updating a resource on passing all new properties though a valid resource object. This resource object must correspond on the ID attribute with a valid resource in logicalDOC.- Parameters:
- resource- The updateable resource
- context- the ImportContext
- session- the current session
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
getChildByNameResource getChildByName(Resource parentResource, String name) throws org.apache.jackrabbit.webdav.DavException Based on the parent resource it will be tried to get a child by a specific name- Parameters:
- parentResource- The parent resource
- name- name of the child must be
- Returns:
- The resource that matches, else it will be returned null
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
getParentResourceBased on the current resource location it will be turned back the upper resource- Parameters:
- resource- the current resource
- Returns:
- the parent resource
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
getParentResourceResource getParentResource(String location, long userId, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException Based on a location path- Parameters:
- location- the resource path
- userId- the user id
- session- the current session
- Returns:
- the parent resource
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
- See Also:
 
- 
moveResource move(Resource target, Resource destination, String newName, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException Moves a resource named target to the folder dictionary destination- Parameters:
- target- the resource that is involved
- destination- the destination folder of the move operation
- newName- optional different name to give to the moved item
- session- the current session
- Returns:
- the moved resource
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
streamOutGets the stream for a resource- Parameters:
- resource- the DAV resource
- Returns:
- the stream of the resource
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communicationn
 
- 
deleteResourcevoid deleteResource(Resource resource, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException Deletion of a resource within logicalDOC.- Parameters:
- resource- a valid resource
- session- the current session
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
copyvoid copy(Resource source, Resource destination, String newName, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException Copying of a resource within logicalDOC.- Parameters:
- source- the DAV resource
- destination- target resource (must be a folder)
- newName- optional new name for the copied resource
- session- the current session
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
checkoutvoid checkout(Resource resource, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException Versioning-part. Checkout causes the system to make a version "overwriteable" to put a new version on it.- Parameters:
- resource- The appropriated resource that has to be checked out
- session- the current session
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
getHistoryVersioning-part. Based upon the current resource, the versionhistory is returned matches to this resource.- Parameters:
- resource- The appropriated resource
- Returns:
- All Versions
 
- 
uncheckoutvoid uncheckout(Resource resource, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException Cancels a checkout- Parameters:
- resource- the DAV resource
- session- the current session
- Throws:
- org.apache.jackrabbit.webdav.DavException- error in the DAV communication
 
- 
addBookmarkvoid addBookmark(Resource resource, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException - Throws:
- org.apache.jackrabbit.webdav.DavException
 
- 
deleteBookmarkvoid deleteBookmark(Resource resource, WebdavSession session) throws org.apache.jackrabbit.webdav.DavException - Throws:
- org.apache.jackrabbit.webdav.DavException
 
 
-