public class DocumentServiceImpl extends Object implements DocumentService
| Modifier and Type | Field and Description |
|---|---|
static String |
CURRENT_STATE_PROP |
static String |
DOCUMENT_NOT_FOUND |
static String |
DOCUMENTS_APP_NAVIGATION_NODE_NAME |
static String |
EXO_DATE_CREATED_PROP |
static String |
EXO_LAST_MODIFIER_PROP |
static String |
EXO_OWNER_PROP |
static String |
EXO_TITLE_PROP |
static String |
JCR_CONTENT |
static String |
JCR_LAST_MODIFIED_PROP |
static String |
MIX_REFERENCEABLE |
| Constructor and Description |
|---|
DocumentServiceImpl(ManageDriveService manageDriveService,
org.gatein.api.Portal portal,
org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService,
org.exoplatform.services.jcr.RepositoryService repoService,
org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator,
LinkManager linkManager,
org.exoplatform.container.xml.PortalContainerInfo portalContainerInfo) |
| Modifier and Type | Method and Description |
|---|---|
Document |
findDocById(String documentId) |
protected org.exoplatform.portal.mop.SiteKey |
getDefaultSiteKey() |
protected org.exoplatform.portal.config.UserPortalConfig |
getDefaultUserPortalConfig() |
String |
getDocumentUrlInPersonalDocuments(javax.jcr.Node currentNode,
String username)
return the URL of the shared document in the Shared Personal Documents folder of the user destination
|
String |
getDocumentUrlInSpaceDocuments(javax.jcr.Node currentNode,
String spaceId)
return the URL of the shared document in the Shared Documents folder of the space destination
|
DriveData |
getDriveOfNode(String nodePath)
Get the drive containing the node with the given node path, for the current user.
|
DriveData |
getDriveOfNode(String nodePath,
String userId,
List<String> memberships)
Get the drive containing the node with the given node path.
|
String |
getLinkInDocumentsApp(String nodePath)
Get link to open a document in the Documents application.
|
String |
getLinkInDocumentsApp(String nodePath,
DriveData drive)
Get link to open a document in the Documents application with the given drive
|
String |
getShortLinkInDocumentsApp(String workspaceName,
String nodeId)
Get the short link to display a document in the Documents app by its id.
|
protected String |
getSpaceRootNavigationNodeURI(String spaceGroupId)
Retrieve the root navigation node URi of a space
This method uses the Portal Navigation API and not the Space API to avoid making ECMS depends on Social
|
public static final String MIX_REFERENCEABLE
public static final String EXO_LAST_MODIFIER_PROP
public static final String EXO_DATE_CREATED_PROP
public static final String JCR_LAST_MODIFIED_PROP
public static final String JCR_CONTENT
public static final String EXO_OWNER_PROP
public static final String EXO_TITLE_PROP
public static final String CURRENT_STATE_PROP
public static final String DOCUMENTS_APP_NAVIGATION_NODE_NAME
public static final String DOCUMENT_NOT_FOUND
public DocumentServiceImpl(ManageDriveService manageDriveService, org.gatein.api.Portal portal, org.exoplatform.services.jcr.ext.app.SessionProviderService sessionProviderService, org.exoplatform.services.jcr.RepositoryService repoService, org.exoplatform.services.jcr.ext.hierarchy.NodeHierarchyCreator nodeHierarchyCreator, LinkManager linkManager, org.exoplatform.container.xml.PortalContainerInfo portalContainerInfo)
public Document findDocById(String documentId) throws javax.jcr.RepositoryException
findDocById in interface DocumentServicejavax.jcr.RepositoryExceptionpublic String getDocumentUrlInPersonalDocuments(javax.jcr.Node currentNode, String username) throws Exception
getDocumentUrlInPersonalDocuments in interface DocumentServiceExceptionpublic String getDocumentUrlInSpaceDocuments(javax.jcr.Node currentNode, String spaceId) throws Exception
getDocumentUrlInSpaceDocuments in interface DocumentServiceExceptionpublic String getShortLinkInDocumentsApp(String workspaceName, String nodeId) throws Exception
getShortLinkInDocumentsApp in interface DocumentServiceworkspaceName - The workspace of the nodenodeId - The id of the nodeExceptionpublic String getLinkInDocumentsApp(String nodePath) throws Exception
getLinkInDocumentsApp in interface DocumentServicenodePath - path of the nt:file node to openExceptionpublic String getLinkInDocumentsApp(String nodePath, DriveData drive) throws Exception
getLinkInDocumentsApp in interface DocumentServicenodePath - path of the nt:file node to opendrive - drive to use to open the nt:file nodeExceptionprotected String getSpaceRootNavigationNodeURI(String spaceGroupId) throws Exception
spaceGroupId - The groupId of the spaceExceptionpublic DriveData getDriveOfNode(String nodePath) throws Exception
DocumentServicegetDriveOfNode in interface DocumentServicenodePath - The path of the nodeExceptionpublic DriveData getDriveOfNode(String nodePath, String userId, List<String> memberships) throws Exception
DocumentServicegetDriveOfNode in interface DocumentServicenodePath - The path of the nodeuserId - The user idmemberships - The user membershipsExceptionprotected org.exoplatform.portal.config.UserPortalConfig getDefaultUserPortalConfig()
throws Exception
ExceptionCopyright © 2003–2019 eXo Platform SAS. All rights reserved.