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>
backendMap
protected LinkedList<String>
orderedBackendNames
protected String
rootUrl
-
Fields inherited from class org.nuxeo.ecm.webdav.backend.AbstractCoreBackend
session
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractVirtualBackend(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
-
-
-
-
Field Detail
-
backendMap
protected Map<String,Backend> backendMap
-
orderedBackendNames
protected LinkedList<String> orderedBackendNames
-
-
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:
getRootPath
in interfaceBackend
-
getRootUrl
public String getRootUrl()
- Specified by:
getRootUrl
in interfaceBackend
-
getBackendDisplayName
public String getBackendDisplayName()
- Specified by:
getBackendDisplayName
in interfaceBackend
-
getVirtualFolderNames
public LinkedList<String> getVirtualFolderNames()
- Specified by:
getVirtualFolderNames
in interfaceBackend
-
registerBackend
protected void registerBackend(Backend backend)
-
getBackend
public Backend getBackend(String uri)
- Specified by:
getBackend
in 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:
getCheckoutUser
in interfaceBackend
-
resolveLocation
public DocumentModel resolveLocation(String location)
- Specified by:
resolveLocation
in interfaceBackend
-
parseLocation
public Path parseLocation(String location)
- Specified by:
parseLocation
in interfaceBackend
-
removeItem
public void removeItem(String location)
- Specified by:
removeItem
in interfaceBackend
-
removeItem
public void removeItem(DocumentRef ref)
- Specified by:
removeItem
in interfaceBackend
-
renameItem
public void renameItem(DocumentModel source, String destinationName)
- Specified by:
renameItem
in 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:
createFolder
in interfaceBackend
-
createFile
public DocumentModel createFile(String parentPath, String name, Blob content)
- Specified by:
createFile
in interfaceBackend
-
createFile
public DocumentModel createFile(String parentPath, String name)
- Specified by:
createFile
in interfaceBackend
-
getChildren
public List<DocumentModel> getChildren(DocumentRef ref)
- Specified by:
getChildren
in interfaceBackend
-
getDisplayName
public String getDisplayName(DocumentModel doc)
- Specified by:
getDisplayName
in interfaceBackend
-
hasPermission
public boolean hasPermission(DocumentRef docRef, String permission)
- Specified by:
hasPermission
in interfaceBackend
-
getDocument
public DocumentModel getDocument(String location)
- Specified by:
getDocument
in interfaceBackend
-
updateDocument
public DocumentModel updateDocument(DocumentModel doc, String name, Blob content)
- Specified by:
updateDocument
in interfaceBackend
-
moveItem
public DocumentModel moveItem(DocumentModel source, DocumentRef targetParentRef, String name)
-
getVirtualPath
public String getVirtualPath(String path)
- Specified by:
getVirtualPath
in interfaceBackend
-
getOrderedBackendNames
public LinkedList<String> getOrderedBackendNames()
- Specified by:
getOrderedBackendNames
in interfaceVirtualBackend
-
-