|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface DocumentLocal
This is the business interface for Document enterprise bean.
| Method Summary | |
|---|---|
long |
countDocuments(long accountId)
Count of all documents owned by this account. |
long |
countImages(long account)
Count of all photo-documents owned by this account. |
long |
countXMLDocuments(long userId)
Count of all documents owned by this user (ignoring account) - for demo use only. |
DocAttachment |
createAttachment(DocBase parentDocument,
DocBase attachedDocument,
java.lang.String description,
AccountUser tolvenAuthor,
java.util.Date now)
Create a new document attachment |
DocCCR |
createCCRDocument(long userId,
long accountId)
The document is immediately persisted (with no XML in it). |
long |
createDocument(DocBase doc,
long userId,
long accountId)
Persist a new document and return it's ID |
long |
createFinalDocument(DocBase doc)
Persist a new document and return it's ID. |
long |
createImage(DocImage doc,
long userId,
long accountId,
byte[] content)
Persist a new image and return it's ID |
DocXML |
createXMLDocument(java.lang.String xmlNS,
long userId,
long accountId)
|
void |
deleteAttachment(long attId,
AccountUser accountUser)
Delete an attachment. |
void |
finalizeDocument(DocBase doc)
Complete the document submission process by rendering the document immutable. |
java.util.List<DocBase> |
findAllDocuments()
Not a very practical method but we'll use it for testing. |
java.util.List<DocXML> |
findAllXMLDocuments(long userId,
int pageSize,
int offset,
java.lang.String sortAttribute,
java.lang.String sortDir)
Return XML documents for the specified user |
java.util.List<DocAttachment> |
findAttachments(DocBase parentDocument)
Find the attachments to the specified document |
DocBase |
findDocument(long docId)
Get a document by its internal ID |
java.util.List<DocBase> |
findDocuments(long author,
int pageSize,
int offset,
java.lang.String sortAttribute,
java.lang.String sortDir)
Return selected documents |
DocImage |
findImage(long docId,
long accountId)
Get a document by its internal ID |
java.util.List<DocImage> |
findImages(long accountId,
int pageSize,
int offset,
java.lang.String sortAttribute,
java.lang.String sortDir)
Return images for the specified account |
java.util.List<DocXML> |
findXMLDocuments(long accountId,
int pageSize,
int offset,
java.lang.String sortAttribute,
java.lang.String sortDir)
Return XML documents for the specified account |
java.util.List<AdministrativeDetail> |
getDetails(DocBase doc,
AccountUser activeAccountUser)
Return the content of this structured xml document as a list of administrative detail objects |
void |
queueTolvenMessage(TolvenMessage tm)
Queue a document to be processed by Tolven. |
void |
saveDocument(DocBase doc)
Save the document without finalizing. |
void |
setDetails(DocBase doc,
java.util.List<AdministrativeDetail> details)
Store document details in XML form. |
| Method Detail |
|---|
long createDocument(DocBase doc,
long userId,
long accountId)
doc - userId - of the authoraccountId - of the account that owns the document
void finalizeDocument(DocBase doc)
doc - long createFinalDocument(DocBase doc)
doc - userId - of the author
void saveDocument(DocBase doc)
doc -
DocCCR createCCRDocument(long userId,
long accountId)
throws CCRException
userId - accountId -
CCRException
DocXML createXMLDocument(java.lang.String xmlNS,
long userId,
long accountId)
java.util.List<DocBase> findAllDocuments()
DocBase findDocument(long docId)
docId - the id of the document
java.util.List<DocXML> findXMLDocuments(long accountId,
int pageSize,
int offset,
java.lang.String sortAttribute,
java.lang.String sortDir)
java.util.List<DocXML> findAllXMLDocuments(long userId,
int pageSize,
int offset,
java.lang.String sortAttribute,
java.lang.String sortDir)
DocImage findImage(long docId,
long accountId)
docId - the id of the documentaccountId - This is not part of the primay key but is required to verify account ownership.
A request for a docId outside of the current account is rejected.
long countDocuments(long accountId)
long countXMLDocuments(long userId)
long countImages(long account)
java.util.List<DocBase> findDocuments(long author,
int pageSize,
int offset,
java.lang.String sortAttribute,
java.lang.String sortDir)
java.util.List<DocImage> findImages(long accountId,
int pageSize,
int offset,
java.lang.String sortAttribute,
java.lang.String sortDir)
long createImage(DocImage doc,
long userId,
long accountId,
byte[] content)
doc - accountId - of the authorcontent - the actual image to store
void setDetails(DocBase doc,
java.util.List<AdministrativeDetail> details)
throws javax.xml.bind.JAXBException,
java.io.IOException
details - A structure ready for marshalling into XML
javax.xml.bind.JAXBException
java.io.IOException
java.util.List<AdministrativeDetail> getDetails(DocBase doc,
AccountUser activeAccountUser)
throws javax.xml.bind.JAXBException,
java.io.IOException
javax.xml.bind.JAXBException
java.io.IOException
DocAttachment createAttachment(DocBase parentDocument,
DocBase attachedDocument,
java.lang.String description,
AccountUser tolvenAuthor,
java.util.Date now)
parentDocument - The account of the parent document and attachment must be the same.attachedDocument - The document to attachdescription - tolvenAuthor - now -
java.util.List<DocAttachment> findAttachments(DocBase parentDocument)
parentDocument - The document for which attachments are sought
void deleteAttachment(long attId,
AccountUser accountUser)
attId - accountUser -
void queueTolvenMessage(TolvenMessage tm)
throws java.lang.Exception
java.lang.Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||