public interface Storer
Modifier and Type | Method and Description |
---|---|
void |
delete(long docId)
Deletes all resources of a document from the storage.
|
void |
delete(long docId,
String resource)
Deletes a specific resource of a document from the storage.
|
boolean |
exists(long docId,
String resource)
Checks if the passed resource exists in the document's container
|
byte[] |
getBytes(long docId,
String resource)
Obtains the document's raw bytes for the specified version
|
String |
getResourceName(Document doc,
String fileVersion,
String suffix)
Computes the resource name inside the container
|
String |
getResourceName(long docId,
String fileVersion,
String suffix)
Computes the resource name inside the container
|
InputStream |
getStream(long docId,
String resource)
Obtains the document's content for the specified version
|
long |
getTotalSize()
Computes the total size of the documents repository(in bytes)
|
List<String> |
listResources(long docId,
String fileVersion)
Lists all resources in the document's container
|
long |
size(long docId,
String resource)
Computed the size of a specific resource.
|
long |
store(File file,
long docId,
String resource) |
long |
store(InputStream stream,
long docId,
String resource)
This method has to store a resource in the document's container.
|
void |
writeTo(long docId,
String resource,
File out)
Writes the specified resource in a file
|
long store(InputStream stream, long docId, String resource)
stream
- Document as InputStreamdocId
- The document identifierresource
- Name of the resource to be storedvoid delete(long docId)
docId
- The document identifiervoid delete(long docId, String resource)
docId
- The document identifierresource
- Name of the resource to be deletedString getResourceName(Document doc, String fileVersion, String suffix)
doc
- The document representationfileVersion
- The file version (use null for the latest version)suffix
- The file suffix (use null if you want the exact document
file)String getResourceName(long docId, String fileVersion, String suffix)
docId
- The document identifierfileVersion
- The file version (use null for the latest version)suffix
- The file suffix (use null if you want the exact document
file)List<String> listResources(long docId, String fileVersion)
docId
- The document's identifierfileVersion
- If specified, lists the resources for that specific
file version onlylong size(long docId, String resource)
docId
- The document's identifierresource
- The resourceboolean exists(long docId, String resource)
docId
- ID of the documentresource
- Name of the resourcevoid writeTo(long docId, String resource, File out)
docId
- The document identifierresource
- Name of the resourcefile
- File that will receive the resource's contentInputStream getStream(long docId, String resource)
docId
- The document's identifierresource
- Name of the resourcebyte[] getBytes(long docId, String resource)
docId
- The document's identifierresource
- Name of the resourcelong getTotalSize()
Copyright © 2008-2014 Logical Objects. All Rights Reserved.