Interface IStore


public interface IStore
This is the interface providing methods for storing the content of documents and their versions.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    copy(String srcId, DMSObject srcObj, String destId, DMSObject destObj)
    Copies the data of the content identified by origId to the content identified by copyId.
    void
    Deletes the content identified by id from the storage of the DMS.
    byte[]
    get(String id, DMSObject obj)
    Returns the content identified by id from the storage of the DMS.
    Returns an InputStream to the content identified by id from the storage of the DMS.
    long
    Returns the number of bytes of the content identified by id from the storage of the DMS.
    void
    insert(String id, byte[] content, DMSObject obj)
    Inserts the content identified by id into the storage of the DMS.
    void
    insert(String id, InputStream is, long length, DMSObject obj)
    Inserts the content identified by id into the storage of the DMS.
    void
    update(String id, byte[] content, DMSObject obj)
    Updates the content identified by id in the storage of the DMS.
    void
    update(String id, InputStream is, long length, DMSObject obj)
    Updates the content identified by id in the storage of the DMS.
  • Method Details

    • insert

      void insert(String id, byte[] content, DMSObject obj)
      Inserts the content identified by id into the storage of the DMS.
      Parameters:
      id - identifies the content
      content - the data to be stored
      obj - the object to which the content belongs to. It is passed if some store implementation needs additional information about the origin of the content.
    • update

      void update(String id, byte[] content, DMSObject obj)
      Updates the content identified by id in the storage of the DMS.
      Parameters:
      id - identifies the content
      content - the new data to be stored
      obj - the object to which the content belongs to. It is passed if some store implementation needs additional information about the origin of the content.
    • delete

      void delete(String id, DMSObject obj)
      Deletes the content identified by id from the storage of the DMS.
      Parameters:
      id - identifies the content
      obj - the object to which the content belongs to. It is passed if some store implementation needs additional information about the origin of the content.
    • get

      byte[] get(String id, DMSObject obj)
      Returns the content identified by id from the storage of the DMS. If there is no content for the passed id, null must be returned.
      Parameters:
      id - identifies the content
      obj - the object to which the content belongs to. It is passed if some store implementation needs additional information about the origin of the content.
    • insert

      void insert(String id, InputStream is, long length, DMSObject obj)
      Inserts the content identified by id into the storage of the DMS.
      Parameters:
      id - identifies the content
      is - an InputStream to the data to be stored
      length - the number of bytes provided by the stream
      obj - the object to which the content belongs to. It is passed if some store implementation needs additional information about the origin of the content.
    • update

      void update(String id, InputStream is, long length, DMSObject obj)
      Updates the content identified by id in the storage of the DMS.
      Parameters:
      id - identifies the content
      is - an InputStream to the data to be stored
      length - the number of bytes provided by the stream
      obj - the object to which the content belongs to. It is passed if some store implementation needs additional information about the origin of the content.
    • getAsStream

      InputStream getAsStream(String id, DMSObject obj)
      Returns an InputStream to the content identified by id from the storage of the DMS. If there is no content for the passed id, null must be returned. Callers must ensure that the returned stream is properly closed after reading it. The caller is responsible for closing the stream.
      Parameters:
      id - identifies the content
      obj - the object to which the content belongs to. It is passed if some store implementation needs additional information about the origin of the content.
    • copy

      void copy(String srcId, DMSObject srcObj, String destId, DMSObject destObj)
      Copies the data of the content identified by origId to the content identified by copyId. If no content for destId already exists it will be created.
      Parameters:
      srcId - the id of the content which data should be copied
      srcObj - the object to which the content belongs to
      destId - the id of the content to which the data should be copied
      destObj - the object to which the destination content belongs to
    • getLength

      long getLength(String id, DMSObject obj)
      Returns the number of bytes of the content identified by id from the storage of the DMS.
      Parameters:
      id - identifies the content
      obj - the object to which the content belongs to. It is passed if some store implementation needs additional information about the origin of the content.