Package com.groiss.dms
Interface IStore
public interface IStore
This is the interface providing methods for storing the content of documents and their versions.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
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[]
Returns the content identified by id from the storage of the DMS.getAsStream
(String id, DMSObject obj) 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
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
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
Inserts the content identified by id into the storage of the DMS.- Parameters:
id
- identifies the contentcontent
- the data to be storedobj
- 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
Updates the content identified by id in the storage of the DMS.- Parameters:
id
- identifies the contentcontent
- the new data to be storedobj
- 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
Deletes the content identified by id from the storage of the DMS.- Parameters:
id
- identifies the contentobj
- 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
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 contentobj
- 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
Inserts the content identified by id into the storage of the DMS.- Parameters:
id
- identifies the contentis
- an InputStream to the data to be storedlength
- the number of bytes provided by the streamobj
- 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
Updates the content identified by id in the storage of the DMS.- Parameters:
id
- identifies the contentis
- an InputStream to the data to be storedlength
- the number of bytes provided by the streamobj
- 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
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 contentobj
- 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
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 copiedsrcObj
- the object to which the content belongs todestId
- the id of the content to which the data should be copieddestObj
- the object to which the destination content belongs to
-
getLength
Returns the number of bytes of the content identified by id from the storage of the DMS.- Parameters:
id
- identifies the contentobj
- the object to which the content belongs to. It is passed if some store implementation needs additional information about the origin of the content.
-