Class DocumentClientImpl

java.lang.Object
com.lexmark.saperion.client.implementation.document.DocumentClientImpl
All Implemented Interfaces:
DocumentClient

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

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

    Modifier and Type
    Method
    Description
    List<com.lexmark.saperion.administration.AclReferenceType>
    This method loads the ACLs set on the current revision of the specified document.
    getRevision(com.lexmark.saperion.document.DocumentRevisionReferenceType id)
    This method returns a document revision client bound to the given revision of the given document.
    List<com.lexmark.saperion.document.DocumentRevisionType>
    This method returns the revision history of a given document.
    This method returns a document revision client bound to the newest revision of the given document.
    void
    This method locks the document.
    void
    This method unlocks the document.

    Methods inherited from class java.lang.Object

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

    • DocumentClientImpl

      public DocumentClientImpl(com.lexmark.saperion.document.DocumentService documentService, com.lexmark.saperion.document.DocumentReferenceType reference)
  • Method Details

    • latestRevision

      public DocumentRevisionClient latestRevision() throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentClient
      This method returns a document revision client bound to the newest revision of the given document. Note that using it may result in write-read, read-write and write-write conflicts.
      Specified by:
      latestRevision in interface DocumentClient
      Returns:
      a document revision client bound to the newest revision of the given document
      Throws:
      com.lexmark.saperion.exceptions.EcmException
    • getRevision

      public DocumentRevisionClient getRevision(com.lexmark.saperion.document.DocumentRevisionReferenceType id)
      Description copied from interface: DocumentClient
      This method returns a document revision client bound to the given revision of the given document.
      Specified by:
      getRevision in interface DocumentClient
      Parameters:
      id - the document revision id
      Returns:
      the document revision client for the given document id
    • lock

      public void lock() throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentClient
      This method locks the document.
      Specified by:
      lock in interface DocumentClient
      Throws:
      com.lexmark.saperion.exceptions.EcmException - when locking the document failed
    • unlock

      public void unlock() throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentClient
      This method unlocks the document.
      Specified by:
      unlock in interface DocumentClient
      Throws:
      com.lexmark.saperion.exceptions.EcmException - when unlocking the document failed
    • getACLs

      public List<com.lexmark.saperion.administration.AclReferenceType> getACLs() throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentClient
      This method loads the ACLs set on the current revision of the specified document.
      Specified by:
      getACLs in interface DocumentClient
      Returns:
      the ACLs currently set
      Throws:
      com.lexmark.saperion.exceptions.EcmException - when loading the ACLs failed
    • getRevisionHistory

      public List<com.lexmark.saperion.document.DocumentRevisionType> getRevisionHistory() throws com.lexmark.saperion.exceptions.EcmException
      Description copied from interface: DocumentClient
      This method returns the revision history of a given document.
      Specified by:
      getRevisionHistory in interface DocumentClient
      Returns:
      a list of revision metadata for all the previous revisions
      Throws:
      com.lexmark.saperion.exceptions.EcmException - when loading revision metadata failed