public class DocumentManager extends Object implements IDocumentManager
Modifier and Type | Field and Description |
---|---|
protected IResource |
resource |
TYPE_ALL
Constructor and Description |
---|
DocumentManager() |
Modifier and Type | Method and Description |
---|---|
DocumentConfig |
get(SessionConfig sessionConfig,
String documentId,
ITransaction transaction)
Returns the DocumentConfig for a document with the given id.
|
Collection<DocumentConfig> |
getChildren(SessionConfig sessionConfig,
String serviceInstanceId,
String folderId,
int type,
ITransaction transaction)
Returns the entries in the specified folder.
|
Collection<String> |
getDocumentPublishToPrincipals(String parentFolderId)
Return a the list of principals for which the
document is published to. |
Collection<String> |
getFolderIdsByParentAndName(SessionConfig sessionConfig,
String serviceInstanceId,
String parentFolderId,
String folderName,
ITransaction transaction)
Returns the ids of the folders child of the given parent and with the given name.
|
String |
getFolderPath(SessionConfig sessionConfig,
String folderId,
ITransaction transaction)
Returns the virtual path to the folder.
|
void |
moveDocument(SessionConfig sessionConfig,
String documentId,
String destFolderId,
ITransaction transaction)
Moves a document (or a folder) to another folder.
|
void |
updateDocumentHierarchyPublishTo(String documentId,
Collection<String> heritagePrincipalsId)
Update the list of principals the
document is published to |
protected IResource resource
public DocumentConfig get(SessionConfig sessionConfig, String documentId, ITransaction transaction) throws PortalException
IDocumentManager
get
in interface IDocumentManager
sessionConfig
- identifier for the session.documentId
- the id of the document.transaction
- the transaction for persistence access.PortalException
public Collection<String> getFolderIdsByParentAndName(SessionConfig sessionConfig, String serviceInstanceId, String parentFolderId, String folderName, ITransaction transaction) throws PortalException
IDocumentManager
getFolderIdsByParentAndName
in interface IDocumentManager
sessionConfig
- identifier for the session.serviceInstanceId
- the content's service instance id.parentFolderId
- the parent folder's id. Null if the folder must not have parent.folderName
- the folder name.transaction
- the transaction for persistence access.PortalException
public Collection<DocumentConfig> getChildren(SessionConfig sessionConfig, String serviceInstanceId, String folderId, int type, ITransaction transaction) throws PortalException
IDocumentManager
getChildren
in interface IDocumentManager
sessionConfig
- identifier for the session.serviceInstanceId
- the document service instance id.folderId
- the id of the folder.type
- the entry types to be returned. Must be DocumentConfig.TYPE_FOLDER
, DocumentConfig.TYPE_DOCUMENT
or IDocumentManager.TYPE_ALL
.transaction
- the transaction for persistence access.PortalException
public String getFolderPath(SessionConfig sessionConfig, String folderId, ITransaction transaction) throws PortalException
IDocumentManager
getFolderPath
in interface IDocumentManager
sessionConfig
- identifier for the session.folderId
- the id of the folder.transaction
- the transaction for persistence access.PortalException
public void moveDocument(SessionConfig sessionConfig, String documentId, String destFolderId, ITransaction transaction) throws PortalException
IDocumentManager
moveDocument
in interface IDocumentManager
sessionConfig
- identifier for the session.documentId
- the document's id.destFolderId
- the id of the destination folder.transaction
- the transaction for persistence access.PortalException
public void updateDocumentHierarchyPublishTo(String documentId, Collection<String> heritagePrincipalsId) throws PortalException
IDocumentManager
Update the list of principals the document
is published to
When the document
type is a folder
, the entire file tree
inside it will also be updated taking into account their inheritance
.
updateDocumentHierarchyPublishTo
in interface IDocumentManager
documentId
- The document identifier
to updateheritagePrincipalsId
- The list of principals to set.PortalException
public Collection<String> getDocumentPublishToPrincipals(String parentFolderId) throws PortalException
IDocumentManager
document
is published to.getDocumentPublishToPrincipals
in interface IDocumentManager
parentFolderId
- The document identifier
PortalException
LumisXP 12.3.0.200408 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.