Interface DocumentsServiceLocal


  • public interface DocumentsServiceLocal
    Local interface for the Documents service from the Planner API
    • 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 id
        isMaster - a flag to get the master document
        Returns:
        the document
        Throws:
        PubServerException
        See Also:
        Document
      • setDocument

        java.lang.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:
        Document
      • setDocuments

        java.util.List<Document> setDocuments​(java.util.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:
        Document
      • addDocuments

        java.util.List<Document> addDocuments​(java.util.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:
        Document
      • deleteDocument

        java.lang.String deleteDocument​(java.lang.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

        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 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:
        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 ID
        filter - 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 ID
        filter - 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 ID
        filter - 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 ID
        filter - 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 ID
        filter - search criteria in DocumentsFilter object
        Returns:
        the list of documents
        Throws:
        ServiceException
        See Also:
        Document, DocumentsFilter