Interface DocumentsServiceLocal
public interface DocumentsServiceLocal
Local interface for the Documents service from the Planner API
-
Method Summary
Modifier and TypeMethodDescriptionaddDocuments(List<Document> documents) Creates new documentsdeleteDocument(String id) Deletes the document at the specified IDgetDocument(String id, boolean isMaster) Returns the document or master document at the specified IDgetDocuments(DocumentsFilter filter) Returns the list of documents fulfilling the search criteria passed as parametergetDocumentsByStatusID(String statusID, DocumentsFilter filter) Returns the list of documents for specified status ID and the search criteriagetDocumentsByTodoID(String todoID, DocumentsFilter filter) Returns the list of documents for specified todo and the search criteriagetDocumentsByWorkflowID(String workflowID, DocumentsFilter filter) Returns the list of documents for specified workflow and the search criteriagetDocumentsForPublication(String publicationID, DocumentsFilter filter) Returns the list of documents belonging to the specified publication and fulfilling search criteriagetMasterDocumentsByStatusID(String statusID, DocumentsFilter filter) Returns the list of master documents for specified status ID and the search criteriasetDocument(Document document) Modifies existing document based on passed parametersetDocuments(List<Document> documents) Modifies existing documentssetPublicationXMasterDocuments(String publicationID, List<Document> masterDocuments, boolean recursiveForChildrenPublication, boolean onlyAdd) Sets master documents for publication at the specified ID
-
Method Details
-
getDocument
Returns the document or master document at the specified ID- Parameters:
id- document idisMaster- a flag to get the master document- Returns:
- the document
- Throws:
PubServerException- See Also:
-
getDocuments
Returns the list of documents fulfilling the search criteria passed as parameter- Parameters:
filter- search criteria in the DocumentsFilter object- Returns:
- the list of documents
- Throws:
ServiceException- See Also:
-
setDocument
Modifies existing document based on passed parameterDocument ID from passed parameter is used to find existing document.
- Parameters:
document-- Returns:
- document ID
- Throws:
PubServerException- See Also:
-
setDocuments
Modifies existing documentsFor each document object from the list the existing document found by its ID is updated.
- Parameters:
documents- the list of documents to update- Returns:
- the list of processed documents. Each Document object from the list contains status code of the operation
- Throws:
ServiceException- See Also:
-
addDocuments
Creates new documentsFor each document parameters are created based on parent publication(s). Values of parameter are taken (if exist) from the nearest parent publication. Metadata, spreads are copied from source document, previews for spreads are created, file is saved.
- Parameters:
documents- the list of documents to create- Returns:
- the list of processed documents. Each Document object from the list contains status code of the operation and new document ID
- Throws:
ServiceException- See Also:
-
deleteDocument
Deletes the document at the specified IDDeletes document, file, spreads and previews, plannings, document parameters, workflow items and workflow todos.
- Parameters:
id- document ID- Returns:
- document ID
- Throws:
ServiceException
-
setPublicationXMasterDocuments
List<Document> setPublicationXMasterDocuments(String publicationID, List<Document> masterDocuments, boolean recursiveForChildrenPublication, boolean onlyAdd) throws ServiceException Sets master documents for publication at the specified ID- Parameters:
publicationID- publication IDmasterDocuments- the list of master documents to set for publicationrecursiveForChildrenPublication- If true it sets master documents for all sub publicationsonlyAdd- If true it adds master documents for publication(s), if false it replaces (sets) master documents of publication(s)- Returns:
- the list of processed documents with status of operation
- Throws:
ServiceException- See Also:
-
getDocumentsByTodoID
Returns the list of documents for specified todo and the search criteria- Parameters:
todoID- todo IDfilter- search criteria in DocumentsFilter object- Returns:
- the list of documents
- Throws:
ServiceException- See Also:
-
getDocumentsByWorkflowID
List<Document> getDocumentsByWorkflowID(String workflowID, DocumentsFilter filter) throws ServiceException Returns the list of documents for specified workflow and the search criteria- Parameters:
workflowID- workflow IDfilter- search criteria in DocumentsFilter object- Returns:
- the list of documents
- Throws:
ServiceException- See Also:
-
getDocumentsByStatusID
List<Document> getDocumentsByStatusID(String statusID, DocumentsFilter filter) throws ServiceException Returns the list of documents for specified status ID and the search criteria- Parameters:
statusID- status IDfilter- search criteria in DocumentsFilter object- Returns:
- the list of documents
- Throws:
ServiceException- See Also:
-
getMasterDocumentsByStatusID
List<Document> getMasterDocumentsByStatusID(String statusID, DocumentsFilter filter) throws ServiceException Returns the list of master documents for specified status ID and the search criteria- Parameters:
statusID- status IDfilter- search criteria in DocumentsFilter object- Returns:
- the list of documents
- Throws:
ServiceException- See Also:
-
getDocumentsForPublication
List<Document> getDocumentsForPublication(String publicationID, DocumentsFilter filter) throws ServiceException Returns the list of documents belonging to the specified publication and fulfilling search criteria- Parameters:
publicationID- publication IDfilter- search criteria in DocumentsFilter object- Returns:
- the list of documents
- Throws:
ServiceException- See Also:
-