Class DocumentRevisionClientImpl

java.lang.Object
com.lexmark.saperion.client.implementation.document.DocumentRevisionClientImpl
All Implemented Interfaces:
DocumentRevisionClient

public class DocumentRevisionClientImpl extends Object implements DocumentRevisionClient
This is the default implementation of DocumentRevisionClient.
Author:
jschwarz
  • Constructor Summary

    Constructors
    Constructor
    Description
    DocumentRevisionClientImpl(com.lexmark.saperion.document.DocumentService documentService, com.lexmark.saperion.document.DocumentRevisionReferenceType reference)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    This method deletes the specified document.
    getElement(com.lexmark.saperion.document.DocumentElementReferenceType elementReference)
    This method returns the document element client for the given document element id.
    com.lexmark.saperion.document.DocumentRevisionType
    This method loads a document revision with its content.
    com.lexmark.saperion.document.DocumentRevisionType
    This method loads a document revision without its content.
    void
    This method removes every revision of this document as well as every element of those revisions.
    SearchClient<com.lexmark.saperion.PropertyType>
    This method returns a search client for the content of the given multi value field of the given document revision.
    com.lexmark.saperion.document.DocumentStoreInformationType
    update(com.lexmark.saperion.document.DocumentElementType documentElement)
    This is a shorthand for update(Collections.<String, PropertyType> emptyMap(), documentElement) updating only the document element and leaving the index data untouched.
    com.lexmark.saperion.document.DocumentStoreInformationType
    update(com.lexmark.saperion.document.UpdateDocumentInputType properties)
    This method updates the document with the given properties containing index-data, structure-data and ACLs.
    com.lexmark.saperion.document.DocumentStoreInformationType
    update(Map<String,com.lexmark.saperion.PropertyType> indexData)
    This is a shorthand for update(indexData, null) updating only the index data and leaving the document structure untouched.
    com.lexmark.saperion.document.DocumentStoreInformationType
    update(Map<String,com.lexmark.saperion.PropertyType> indexData, com.lexmark.saperion.document.DocumentElementType documentElement)
    This method updates the document instance and replaces the document with the given entity.
    void
    This method adds fulltext data to the specified field without creating a new revision.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DocumentRevisionClientImpl

      public DocumentRevisionClientImpl(com.lexmark.saperion.document.DocumentService documentService, com.lexmark.saperion.document.DocumentRevisionReferenceType reference)
  • Method Details

    • loadMetadata

      public com.lexmark.saperion.document.DocumentRevisionType loadMetadata() throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This method loads a document revision without its content.
      Specified by:
      loadMetadata in interface DocumentRevisionClient
      Returns:
      the document revision without its content
      Throws:
      com.lexmark.saperion.exceptions.EcmException - indicates that a system exception occurred
    • load

      public com.lexmark.saperion.document.DocumentRevisionType load() throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This method loads a document revision with its content.
      Specified by:
      load in interface DocumentRevisionClient
      Returns:
      the complete document revision
      Throws:
      com.lexmark.saperion.exceptions.EcmException - indicates that a system exception occurred
    • delete

      public void delete() throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This method deletes the specified document.
      Specified by:
      delete in interface DocumentRevisionClient
      Throws:
      com.lexmark.saperion.exceptions.EcmException - indicates that a system exception occurred
    • update

      public com.lexmark.saperion.document.DocumentStoreInformationType update(Map<String,com.lexmark.saperion.PropertyType> indexData, com.lexmark.saperion.document.DocumentElementType documentElement) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This method updates the document instance and replaces the document with the given entity.
      Specified by:
      update in interface DocumentRevisionClient
      Parameters:
      indexData - the index data changes of the document
      documentElement - the new document root structure
      Throws:
      com.lexmark.saperion.exceptions.EcmException - indicates that a system exception occurred
    • update

      public com.lexmark.saperion.document.DocumentStoreInformationType update(com.lexmark.saperion.document.DocumentElementType documentElement) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This is a shorthand for update(Collections.<String, PropertyType> emptyMap(), documentElement) updating only the document element and leaving the index data untouched.
      Specified by:
      update in interface DocumentRevisionClient
      Parameters:
      documentElement - the new document root structure
      Throws:
      com.lexmark.saperion.exceptions.EcmException
    • update

      public com.lexmark.saperion.document.DocumentStoreInformationType update(Map<String,com.lexmark.saperion.PropertyType> indexData) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This is a shorthand for update(indexData, null) updating only the index data and leaving the document structure untouched.
      Specified by:
      update in interface DocumentRevisionClient
      Parameters:
      indexData - the index data changes of the document
      Throws:
      com.lexmark.saperion.exceptions.EcmException
    • update

      public com.lexmark.saperion.document.DocumentStoreInformationType update(com.lexmark.saperion.document.UpdateDocumentInputType properties) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This method updates the document with the given properties containing index-data, structure-data and ACLs.
      Specified by:
      update in interface DocumentRevisionClient
      Parameters:
      properties - the properties to update
      Returns:
      information about the new revision
      Throws:
      com.lexmark.saperion.exceptions.EcmException - when updating the document failed
    • writeFulltextData

      public void writeFulltextData(String fieldName, InputStream data) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This method adds fulltext data to the specified field without creating a new revision. The field must be a fulltext-enabled text field. Note that fulltext data is stored in the database only.
      Specified by:
      writeFulltextData in interface DocumentRevisionClient
      Parameters:
      fieldName - the name of the field used to store fulltext data
      data - the fulltext data
      Throws:
      com.lexmark.saperion.exceptions.EcmException - when writing the data failed
    • searchMultiValueField

      public SearchClient<com.lexmark.saperion.PropertyType> searchMultiValueField(String fieldName) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This method returns a search client for the content of the given multi value field of the given document revision.
      Specified by:
      searchMultiValueField in interface DocumentRevisionClient
      Parameters:
      fieldName - the name of the multi value field
      Returns:
      a search client for the content of the given multi value field of the given document revision
      Throws:
      com.lexmark.saperion.exceptions.EcmException
    • getElement

      public DocumentElementClient getElement(com.lexmark.saperion.document.DocumentElementReferenceType elementReference) throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This method returns the document element client for the given document element id.
      Specified by:
      getElement in interface DocumentRevisionClient
      Parameters:
      elementReference - the document element reference
      Returns:
      the document element client for the given document element id
      Throws:
      com.lexmark.saperion.exceptions.EcmException
    • purge

      public void purge() throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentRevisionClient
      This method removes every revision of this document as well as every element of those revisions. This operation cannot be undone.
      Specified by:
      purge in interface DocumentRevisionClient
      Throws:
      com.lexmark.saperion.exceptions.EcmException