public class SimpleBackend extends AbstractCoreBackend
| Modifier and Type | Field and Description |
|---|---|
static String |
ALWAYS_CREATE_FILE_PROP |
protected String |
backendDisplayName |
protected LinkedList<String> |
orderedBackendNames |
protected PathCache |
pathCache |
protected String |
rootPath |
protected String |
rootUrl |
static String |
SOURCE_EDIT_KEYWORD |
protected TrashService |
trashService |
session| Modifier | Constructor and Description |
|---|---|
protected |
SimpleBackend(String backendDisplayName,
String rootPath,
String rootUrl,
CoreSession session) |
getSession, getSession, saveChangespublic static final String SOURCE_EDIT_KEYWORD
public static final String ALWAYS_CREATE_FILE_PROP
protected String backendDisplayName
protected String rootPath
protected String rootUrl
protected TrashService trashService
protected PathCache pathCache
protected LinkedList<String> orderedBackendNames
protected SimpleBackend(String backendDisplayName, String rootPath, String rootUrl, CoreSession session)
protected PathCache getPathCache() throws ClientException
ClientExceptionpublic String getRootPath()
public String getRootUrl()
public String getBackendDisplayName()
public boolean exists(String location)
public boolean hasPermission(DocumentRef docRef, String permission) throws ClientException
ClientExceptionpublic DocumentModel updateDocument(DocumentModel doc, String name, Blob content) throws ClientException
ClientExceptionpublic LinkedList<String> getVirtualFolderNames() throws ClientException
ClientExceptionpublic final boolean isVirtual()
public boolean isRoot()
public DocumentModel resolveLocation(String location) throws ClientException
ClientExceptionprotected DocumentModel resolveParent(String location) throws ClientException
ClientExceptionpublic org.nuxeo.common.utils.Path parseLocation(String location)
public void removeItem(String location) throws ClientException
ClientExceptionpublic void removeItem(DocumentRef ref) throws ClientException
ClientExceptionpublic void renameItem(DocumentModel source, String destinationName) throws ClientException
ClientExceptionpublic DocumentModel moveItem(DocumentModel source, PathRef targetParentRef) throws ClientException
ClientExceptionpublic DocumentModel moveItem(DocumentModel source, DocumentRef targetParentRef, String name) throws ClientException
ClientExceptionpublic DocumentModel copyItem(DocumentModel source, PathRef targetParentRef) throws ClientException
ClientExceptionpublic DocumentModel createFolder(String parentPath, String name) throws ClientException
ClientExceptionpublic DocumentModel createFile(String parentPath, String name, Blob content) throws ClientException
ClientExceptionpublic DocumentModel createFile(String parentPath, String name) throws ClientException
ClientExceptionpublic String getDisplayName(DocumentModel doc)
public List<DocumentModel> getChildren(DocumentRef ref) throws ClientException
ClientExceptionpublic boolean isLocked(DocumentRef ref) throws ClientException
ClientExceptionpublic boolean canUnlock(DocumentRef ref) throws ClientException
ClientExceptionpublic String lock(DocumentRef ref) throws ClientException
ClientExceptionpublic boolean unlock(DocumentRef ref) throws ClientException
ClientExceptionpublic String getCheckoutUser(DocumentRef ref) throws ClientException
ClientExceptionpublic DocumentModel getDocument(String location) throws ClientException
ClientExceptionprotected String getFileName(DocumentModel doc)
protected boolean isTrashDocument(DocumentModel model) throws ClientException
ClientExceptionprotected TrashService getTrashService() throws Exception
Exceptionprotected boolean cleanTrashPath(DocumentModel parent, String name) throws ClientException
ClientExceptionprotected boolean cleanTrashPath(DocumentRef parentRef, String name) throws ClientException
ClientExceptionprotected String encode(byte[] bytes, String encoding) throws ClientException
ClientExceptionCopyright © 2019 Nuxeo SA. All rights reserved.