Interface MTDocumentStore


public interface MTDocumentStore
Utility methods for documents.
Since:
3.0
  • Method Details

    • findDocument

      MTDocument findDocument(long id) throws MTAccessException
      Finds a document by ID.
      Parameters:
      id - The document ID.
      Returns:
      A document or null if no such document exists.
      Throws:
      MTAccessException
      Since:
      3.0
    • findDocument

      MTDocument findDocument(String uuid) throws MTAccessException
      Finds a document by UUID.
      Parameters:
      uuid - The document UUID.
      Returns:
      A document or null if no such document exists.
      Throws:
      MTAccessException
      Since:
      3.0
    • findDocuments

      List<MTDocument> findDocuments(List<Long> idList) throws MTAccessException
      Finds documents in the current repository from a list of document ID:s. The documents will be returned in the same order as the ID list. Documents which the current user does not have read access to will be filtered out of the result.
      Parameters:
      idList - The ID:s of documents to find.
      Returns:
      A list of documents with the ID:s in idList.
      Throws:
      MTAccessException
      Since:
      3.0
    • findDocumentsWithContent

      List<MTDocumentHeader> findDocumentsWithContent(MTRepository repo, MTLanguage lang, String content, int maxResult) throws MTAccessException
      Finds the documents with the given content.
      Parameters:
      repo -
      lang -
      content - contents of the document
      maxResult -
      Returns:
      list of documents with the content
      Throws:
      MTAccessException
      Since:
      9.0
    • findDocumentHeaders

      List<MTDocumentHeader> findDocumentHeaders(List<Long> idList) throws MTAccessException
      Finds documents in the current repository from a list of document ID:s, as headers. The documents will be returned in the same order as the ID list. Documents which the current user does not have read access to will be filtered out of the result.
      Parameters:
      idList - The ID:s of documents to find.
      Returns:
      A list of documents with the ID:s in idList.
      Throws:
      MTAccessException
      Since:
      3.0
    • findDocumentType

      MTDocumentType findDocumentType(long documentTypeID) throws MTAccessException
      Finds a document type by ID.
      Parameters:
      documentTypeID - The document type ID.
      Returns:
      A document type or null if no such document type exists.
      Throws:
      MTAccessException
      Since:
      3.0
    • findDocumentTypes

      List<MTDocumentType> findDocumentTypes(List<Long> idList) throws MTAccessException
      Finds document types from a list of document type ID:s. The types will be returned in the same order as the ID list.
      Parameters:
      idList - The ID:s of document types to find.
      Returns:
      A list of document types with the ID:s in idList.
      Throws:
      MTAccessException
      Since:
      3.0
    • findDocumentTypeHeaders

      List<MTDocumentTypeHeader> findDocumentTypeHeaders(List<Long> idList) throws MTAccessException
      Finds document types from a list of document type ID:s, as header. The types will be returned in the same order as the ID list.
      Parameters:
      idList - The ID:s of document types to find.
      Returns:
      A list of document types with the ID:s in idList.
      Throws:
      MTAccessException
      Since:
      3.0
    • findDuplicateDocumentHeaders

      List<List<MTDocumentHeader>> findDuplicateDocumentHeaders() throws MTAccessException
      Finds duplicates for the documents in the current repository and current language. Documents are considered duplicate when two or more have the same URL. NOTE: This method will look for possible duplicates in the whole repository.
      Returns:
      A list of lists of the duplicates.
      Throws:
      MTAccessException
      Since:
      9.0
    • findDuplicateDocumentHeaders

      List<List<MTDocumentHeader>> findDuplicateDocumentHeaders(List<Long> idList) throws MTAccessException
      Finds duplicates for the documents specified by the idList in the current repository and current language. Documents are considered duplicate when two or more have the same URL. NOTE: This method will look for possible duplicates in the whole repository but filter the result based on idList.
      Parameters:
      idList - list of document id's to find duplicates for.
      Returns:
      A list of lists of the duplicates.
      Throws:
      MTAccessException
      Since:
      9.0