public class ResourceServiceImpl extends Object implements ResourceService
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
| Constructor and Description |
|---|
ResourceServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkout(Resource resource,
DavSession session)
Versioning-part.
|
protected void |
checkPublished(User user,
Document doc) |
protected void |
checkPublished(User user,
long docId) |
void |
copyResource(Resource destinationResource,
Resource resource,
DavSession session)
Copying of a resource within logicalDOC.
|
Resource |
createResource(Resource parentResource,
String name,
boolean isCollection,
ImportContext context,
DavSession session)
Handle of resource creation by passed parent resource as well as the most
import parameters needed for a resource creation.
|
void |
deleteResource(Resource resource,
DavSession session)
Deletion of a resource within logicalDOC.
|
protected void |
finalize() |
Resource |
getChildByName(Resource parentResource,
String name)
Based on the parent resource it will be tried to get a child by a
specific name
|
List<Resource> |
getChildResources(Resource parentResource)
On passing a valid
|
List<Resource> |
getHistory(Resource resource)
Versioning-part.
|
Resource |
getParentResource(Resource resource)
Based on the current resource location it will be turned back the upper
resource
|
Resource |
getParentResource(String resourcePath,
long userId,
DavSession session)
Based on a location path (given by
|
Resource |
getResource(String requestPath,
DavSession session)
On passing a location as well as the current session you gettin back the
appropriated resource.
|
boolean |
isCheckedOut(Resource resource) |
Resource |
move(Resource source,
Resource destination,
DavSession session)
Moves a resource named target to the folder dictionary destination
|
boolean |
resourceExists(Resource resource)
Check for existing resource(logically)
|
void |
setDocumentDAO(DocumentDAO documentDAO) |
void |
setDocumentManager(DocumentManager documentManager) |
void |
setFolderDAO(FolderDAO folderDAO) |
void |
setStorer(Storer storer) |
void |
setUserDAO(UserDAO userDAO) |
void |
setVersionDAO(VersionDAO versionDAO) |
void |
streamIn(Resource resource,
InputStream is) |
InputStream |
streamOut(Resource resource) |
void |
uncheckout(Resource resource,
DavSession session) |
Resource |
updateResource(Resource resource)
Updating a resource on passing all new properties though a valid resource
object.
|
void |
updateResource(Resource resource,
ImportContext context,
DavSession session)
Updating a resource on passing all new properties though a valid resource
object.
|
public void setUserDAO(UserDAO userDAO)
public void setDocumentDAO(DocumentDAO documentDAO)
public void setDocumentManager(DocumentManager documentManager)
public List<Resource> getChildResources(Resource parentResource)
ResourceServicegetChildResources in interface ResourceServiceparentResource - The resource(mostly a folder) from which are all
direct childs has to be fetched and turned backpublic Resource getResource(String requestPath, DavSession session) throws org.apache.jackrabbit.webdav.DavException
ResourceServicegetResource in interface ResourceServicerequestPath - The location retrieved through DavResourceLocator.getResourcePath()session - The current sessionorg.apache.jackrabbit.webdav.DavExceptionpublic Resource getParentResource(String resourcePath, long userId, DavSession session)
ResourceServicegetParentResource in interface ResourceServiceresourcePath - the resource pathuserId - the user idsession - the current sessioncom.logicaldoc.webdav.resource.service.ResourceService#getParentResource(java.lang.String,
long)protected void finalize()
throws Throwable
public Resource createResource(Resource parentResource, String name, boolean isCollection, ImportContext context, DavSession session) throws org.apache.jackrabbit.webdav.DavException
ResourceServicecreateResource in interface ResourceServiceparentResource - The parent resource(mostly a folder)name - the filename and titlename of the childisCollection - is the resource folder?context - for inputstreamsession - the current sessionResourceorg.apache.jackrabbit.webdav.DavExceptionpublic void updateResource(Resource resource, ImportContext context, DavSession session) throws org.apache.jackrabbit.webdav.DavException
ResourceServiceupdateResource in interface ResourceServiceresource - The updateable resourcecontext - the ImportContextsession - the current sessionorg.apache.jackrabbit.webdav.DavExceptionpublic Resource getChildByName(Resource parentResource, String name)
ResourceServicegetChildByName in interface ResourceServiceparentResource - The parent resourcename - name of the child must bepublic boolean resourceExists(Resource resource)
ResourceServiceresourceExists in interface ResourceServiceresource - The Resourcepublic Resource updateResource(Resource resource)
ResourceServiceupdateResource in interface ResourceServiceresource - The updateable resourcepublic Resource move(Resource source, Resource destination, DavSession session) throws org.apache.jackrabbit.webdav.DavException
ResourceServicemove in interface ResourceServicesource - the resource that is involveddestination - the destination of the move operationsession - the current sessionorg.apache.jackrabbit.webdav.DavExceptionpublic void deleteResource(Resource resource, DavSession session) throws org.apache.jackrabbit.webdav.DavException
ResourceServicedeleteResource in interface ResourceServiceresource - a vaild resourcesession - the current sessionorg.apache.jackrabbit.webdav.DavExceptionpublic void copyResource(Resource destinationResource, Resource resource, DavSession session) throws org.apache.jackrabbit.webdav.DavException
ResourceServicecopyResource in interface ResourceServicesession - the current sessionorg.apache.jackrabbit.webdav.DavExceptionpublic Resource getParentResource(Resource resource)
ResourceServicegetParentResource in interface ResourceServiceresource - the current resourcepublic void streamIn(Resource resource, InputStream is)
streamIn in interface ResourceServicepublic InputStream streamOut(Resource resource)
streamOut in interface ResourceServicepublic void checkout(Resource resource, DavSession session) throws org.apache.jackrabbit.webdav.DavException
ResourceServicecheckout in interface ResourceServiceresource - The appropriated resource that has to be checked outsession - the current sessionorg.apache.jackrabbit.webdav.DavExceptionpublic boolean isCheckedOut(Resource resource)
protected void checkPublished(User user, Document doc) throws org.apache.jackrabbit.webdav.DavException
org.apache.jackrabbit.webdav.DavExceptionprotected void checkPublished(User user, long docId) throws org.apache.jackrabbit.webdav.DavException
org.apache.jackrabbit.webdav.DavExceptionpublic List<Resource> getHistory(Resource resource)
ResourceServicegetHistory in interface ResourceServiceresource - The appropriated resourcepublic void uncheckout(Resource resource, DavSession session)
uncheckout in interface ResourceServicesession - the current sessionpublic void setVersionDAO(VersionDAO versionDAO)
public void setFolderDAO(FolderDAO folderDAO)
public void setStorer(Storer storer)
Copyright © 2008-2014 Logical Objects. All Rights Reserved.