Interface DocumentsServiceLocal


public interface DocumentsServiceLocal
Local interface for the Documents service from the Planner API
  • Method Details

    • getDocument

      Document getDocument(String id, boolean isMaster) throws PubServerException
      Returns the document or master document at the specified ID
      Parameters:
      id - document id
      isMaster - a flag to get the master document
      Returns:
      the document
      Throws:
      PubServerException
      See Also:
    • getDocuments

      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:
    • setDocument

      String setDocument(Document document) throws PubServerException
      Modifies existing document based on passed parameter

      Document ID from passed parameter is used to find existing document.

      Parameters:
      document -
      Returns:
      document ID
      Throws:
      PubServerException
      See Also:
    • setDocuments

      List<Document> setDocuments(List<Document> documents) throws ServiceException
      Modifies existing documents

      For 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

      List<Document> addDocuments(List<Document> documents) throws ServiceException
      Creates new documents

      For 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

      String deleteDocument(String id) throws ServiceException
      Deletes the document at the specified ID

      Deletes 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 ID
      masterDocuments - the list of master documents to set for publication
      recursiveForChildrenPublication - If true it sets master documents for all sub publications
      onlyAdd - 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

      List<Document> getDocumentsByTodoID(String todoID, DocumentsFilter filter) throws ServiceException
      Returns the list of documents for specified todo and the search criteria
      Parameters:
      todoID - todo ID
      filter - 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 ID
      filter - 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 ID
      filter - 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 ID
      filter - 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 ID
      filter - search criteria in DocumentsFilter object
      Returns:
      the list of documents
      Throws:
      ServiceException
      See Also: