jBPM :: Document Service 6.2.1-SNAPSHOT

org.jbpm.document.service
Interface DocumentStorageService

All Known Implementing Classes:
DocumentStorageServiceImpl

public interface DocumentStorageService

Simple storage service definition


Method Summary
 Document buildDocument(String name, long size, Date lastModified, Map<String,String> params)
          Generates a Document instance.
 boolean deleteDocument(Document document)
          Deletes the File identified by the given id
 boolean deleteDocument(String id)
          Deletes the File identified by the given id
 Document getDocument(String id)
          Method to obtain a File for the given storage id
 Document saveDocument(Document document, byte[] content)
          Method to store the uploaded file on the system
 

Method Detail

buildDocument

Document buildDocument(String name,
                       long size,
                       Date lastModified,
                       Map<String,String> params)
Generates a Document instance.

Parameters:
name - The document name
size - The document size
lastModified - The lastModified date of the document
params - A Map containing the params to create the document.
Returns:

saveDocument

Document saveDocument(Document document,
                      byte[] content)
Method to store the uploaded file on the system

Parameters:
document - The document to store the content
content - The document content
Returns:
A Document

getDocument

Document getDocument(String id)
Method to obtain a File for the given storage id

Parameters:
id - The Document id to obtain the Document
Returns:
The java.io.File identified with the id

deleteDocument

boolean deleteDocument(String id)
Deletes the File identified by the given id

Parameters:
id - The Document id to delete
Returns:
true if it was possible to remove, false if not

deleteDocument

boolean deleteDocument(Document document)
Deletes the File identified by the given id

Parameters:
document - The Document to delete
Returns:
true if it was possible to remove, false if not

jBPM :: Document Service 6.2.1-SNAPSHOT

Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.