Interface DocumentsServiceLocal
-
public interface DocumentsServiceLocalLocal interface for the Documents service from the Planner API
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<Document>addDocuments(java.util.List<Document> documents)Creates new documentsjava.lang.StringdeleteDocument(java.lang.String id)Deletes the document at the specified IDDocumentgetDocument(java.lang.String id, boolean isMaster)Returns the document or master document at the specified IDjava.util.List<Document>getDocuments(DocumentsFilter filter)Returns the list of documents fulfilling the search criteria passed as parameterjava.util.List<Document>getDocumentsByStatusID(java.lang.String statusID, DocumentsFilter filter)Returns the list of documents for specified status ID and the search criteriajava.util.List<Document>getDocumentsByTodoID(java.lang.String todoID, DocumentsFilter filter)Returns the list of documents for specified todo and the search criteriajava.util.List<Document>getDocumentsByWorkflowID(java.lang.String workflowID, DocumentsFilter filter)Returns the list of documents for specified workflow and the search criteriajava.util.List<Document>getDocumentsForPublication(java.lang.String publicationID, DocumentsFilter filter)Returns the list of documents belonging to the specified publication and fulfilling search criteriajava.util.List<Document>getMasterDocumentsByStatusID(java.lang.String statusID, DocumentsFilter filter)Returns the list of master documents for specified status ID and the search criteriajava.lang.StringsetDocument(Document document)Modifies existing document based on passed parameterjava.util.List<Document>setDocuments(java.util.List<Document> documents)Modifies existing documentsjava.util.List<Document>setPublicationXMasterDocuments(java.lang.String publicationID, java.util.List<Document> masterDocuments, boolean recursiveForChildrenPublication, boolean onlyAdd)Sets master documents for publication at the specified ID
-
-
-
Method Detail
-
getDocument
Document getDocument(java.lang.String id, boolean isMaster) throws PubServerException
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:
Document
-
getDocuments
java.util.List<Document> getDocuments(DocumentsFilter filter) throws ServiceException
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:
Document,DocumentsFilter
-
setDocument
java.lang.String setDocument(Document document) throws PubServerException
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:
Document
-
setDocuments
java.util.List<Document> setDocuments(java.util.List<Document> documents) throws ServiceException
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:
Document
-
addDocuments
java.util.List<Document> addDocuments(java.util.List<Document> documents) throws ServiceException
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:
Document
-
deleteDocument
java.lang.String deleteDocument(java.lang.String id) throws ServiceExceptionDeletes 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
java.util.List<Document> setPublicationXMasterDocuments(java.lang.String publicationID, java.util.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:
Document
-
getDocumentsByTodoID
java.util.List<Document> getDocumentsByTodoID(java.lang.String todoID, DocumentsFilter filter) throws ServiceException
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:
Document,DocumentsFilter
-
getDocumentsByWorkflowID
java.util.List<Document> getDocumentsByWorkflowID(java.lang.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:
Document,DocumentsFilter
-
getDocumentsByStatusID
java.util.List<Document> getDocumentsByStatusID(java.lang.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:
Document,DocumentsFilter
-
getMasterDocumentsByStatusID
java.util.List<Document> getMasterDocumentsByStatusID(java.lang.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:
Document,DocumentsFilter
-
getDocumentsForPublication
java.util.List<Document> getDocumentsForPublication(java.lang.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:
Document,DocumentsFilter
-
-