Package org.nuxeo.ecm.webdav.backend
Class AbstractVirtualBackend
- java.lang.Object
-
- org.nuxeo.ecm.webdav.backend.AbstractCoreBackend
-
- org.nuxeo.ecm.webdav.backend.AbstractVirtualBackend
-
- All Implemented Interfaces:
Backend,VirtualBackend
- Direct Known Subclasses:
SearchVirtualBackend
public abstract class AbstractVirtualBackend extends AbstractCoreBackend implements VirtualBackend
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,Backend>backendMapprotected LinkedList<String>orderedBackendNamesprotected StringrootUrl-
Fields inherited from class org.nuxeo.ecm.webdav.backend.AbstractCoreBackend
session
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractVirtualBackend(String name, String rootUrl, CoreSession session, RealBackendFactory realBackendFactory)
-
Method Summary
-
Methods inherited from class org.nuxeo.ecm.webdav.backend.AbstractCoreBackend
getSession, getSession, saveChanges
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.nuxeo.ecm.webdav.backend.Backend
getSession, getSession, saveChanges
-
-
-
-
Constructor Detail
-
AbstractVirtualBackend
protected AbstractVirtualBackend(String name, String rootUrl, CoreSession session, RealBackendFactory realBackendFactory)
-
-
Method Detail
-
registerSimpleBackends
protected void registerSimpleBackends(List<DocumentModel> docs)
-
getRootPath
public String getRootPath()
- Specified by:
getRootPathin interfaceBackend
-
getRootUrl
public String getRootUrl()
- Specified by:
getRootUrlin interfaceBackend
-
getBackendDisplayName
public String getBackendDisplayName()
- Specified by:
getBackendDisplayNamein interfaceBackend
-
getVirtualFolderNames
public LinkedList<String> getVirtualFolderNames()
- Specified by:
getVirtualFolderNamesin interfaceBackend
-
registerBackend
protected void registerBackend(Backend backend)
-
getBackend
public Backend getBackend(String uri)
- Specified by:
getBackendin interfaceBackend
-
initIfNeed
protected void initIfNeed()
-
init
protected abstract void init()
-
isLocked
public boolean isLocked(DocumentRef ref)
-
canUnlock
public boolean canUnlock(DocumentRef ref)
-
lock
public String lock(DocumentRef ref)
-
unlock
public boolean unlock(DocumentRef ref)
-
getCheckoutUser
public String getCheckoutUser(DocumentRef ref)
- Specified by:
getCheckoutUserin interfaceBackend
-
resolveLocation
public DocumentModel resolveLocation(String location)
- Specified by:
resolveLocationin interfaceBackend
-
parseLocation
public Path parseLocation(String location)
- Specified by:
parseLocationin interfaceBackend
-
removeItem
public void removeItem(String location)
- Specified by:
removeItemin interfaceBackend
-
removeItem
public void removeItem(DocumentRef ref)
- Specified by:
removeItemin interfaceBackend
-
renameItem
public void renameItem(DocumentModel source, String destinationName)
- Specified by:
renameItemin interfaceBackend
-
moveItem
public DocumentModel moveItem(DocumentModel source, PathRef targetParentRef)
-
copyItem
public DocumentModel copyItem(DocumentModel source, PathRef targetParentRef)
-
createFolder
public DocumentModel createFolder(String parentPath, String name)
- Specified by:
createFolderin interfaceBackend
-
createFile
public DocumentModel createFile(String parentPath, String name, Blob content)
- Specified by:
createFilein interfaceBackend
-
createFile
public DocumentModel createFile(String parentPath, String name)
- Specified by:
createFilein interfaceBackend
-
getChildren
public List<DocumentModel> getChildren(DocumentRef ref)
- Specified by:
getChildrenin interfaceBackend
-
getDisplayName
public String getDisplayName(DocumentModel doc)
- Specified by:
getDisplayNamein interfaceBackend
-
hasPermission
public boolean hasPermission(DocumentRef docRef, String permission)
- Specified by:
hasPermissionin interfaceBackend
-
getDocument
public DocumentModel getDocument(String location)
- Specified by:
getDocumentin interfaceBackend
-
updateDocument
public DocumentModel updateDocument(DocumentModel doc, String name, Blob content)
- Specified by:
updateDocumentin interfaceBackend
-
moveItem
public DocumentModel moveItem(DocumentModel source, DocumentRef targetParentRef, String name)
-
getVirtualPath
public String getVirtualPath(String path)
- Specified by:
getVirtualPathin interfaceBackend
-
getOrderedBackendNames
public LinkedList<String> getOrderedBackendNames()
- Specified by:
getOrderedBackendNamesin interfaceVirtualBackend
-
-