public class BaseDocumentModule extends Object
Constructor and Description |
---|
BaseDocumentModule() |
Modifier and Type | Method and Description |
---|---|
static NodeDocument |
copy(String user,
NodeDocument srcDocNode,
String dstPath,
NodeBase dstNode,
String docName,
ExtendedAttributes extAttr)
Is invoked from DbDocumentNode and DbFolderNode.
|
static NodeDocument |
create(String user,
String parentPath,
NodeBase parentNode,
String name,
String title,
Calendar created,
String mimeType,
InputStream is,
long size,
Set<String> keywords,
Set<String> categories,
Set<NodeProperty> propertyGroups,
List<NodeNote> notes,
WikiPage wiki,
Ref<FileUploadResponse> fuResponse)
Create a new document
|
static InputStream |
getContent(String user,
String docUuid,
String docPath,
boolean checkout,
boolean extendedSecurity)
Retrieve the content input stream from a document
|
static Document |
getProperties(String user,
NodeDocument nDocument)
Get folder properties
|
static boolean |
hasWorkflowNodes(String docUuid)
Check if a node is being used in a running workflow
|
public static NodeDocument create(String user, String parentPath, NodeBase parentNode, String name, String title, Calendar created, String mimeType, InputStream is, long size, Set<String> keywords, Set<String> categories, Set<NodeProperty> propertyGroups, List<NodeNote> notes, WikiPage wiki, Ref<FileUploadResponse> fuResponse) throws PathNotFoundException, AccessDeniedException, ItemExistsException, UserQuotaExceededException, AutomationException, DatabaseException, IOException
public static Document getProperties(String user, NodeDocument nDocument) throws PathNotFoundException, DatabaseException
public static InputStream getContent(String user, String docUuid, String docPath, boolean checkout, boolean extendedSecurity) throws IOException, PathNotFoundException, AccessDeniedException, DatabaseException
user
- The user who make the content petition.docUuid
- UUID of the document to get the content.docPath
- Path of the document to get the content.checkout
- If the content is retrieved due to a checkout or not.extendedSecurity
- If the extended security DOWNLOAD permission should be evaluated.
This is used to enable the document preview.IOException
PathNotFoundException
AccessDeniedException
DatabaseException
public static boolean hasWorkflowNodes(String docUuid) throws WorkflowException, PathNotFoundException, DatabaseException
public static NodeDocument copy(String user, NodeDocument srcDocNode, String dstPath, NodeBase dstNode, String docName, ExtendedAttributes extAttr) throws PathNotFoundException, AccessDeniedException, ItemExistsException, UserQuotaExceededException, AutomationException, DatabaseException, IOException
Copyright © 2018 Open Knowledge Management System S.L.. All rights reserved.