public interface IDocument
Modifier and Type | Method and Description |
---|---|
void |
addExtension(java.lang.String name,
com.ibm.spe.core.context.IDocExtension ext)
Adds an extension to this document.
|
IDocument |
copyDocument()
Makes a copy of this document.
|
IDocument |
copyDocument(boolean shareDocumentBody)
Makes a copy of this document, but optionally the document body is shared with the copy.
|
void |
deleteUnpersisted()
Deletes an unpersisted document.
|
boolean |
existInDB()
Returns whether or not the document exists in the database.
|
AckFlag |
getAckFlag()
Gets the functional acknowledgment flag.
|
byte[] |
getBody()
Gets the document body.
|
org.w3c.dom.Document |
getBodyAsLocalDOM()
Returns a DOM representation of the document body.
|
java.lang.String |
getBodyName()
Gets the body name.
|
java.lang.String |
getCharEncoding()
Gets the encoding.
|
java.lang.String |
getContentSubType()
Gets the content sub type.
|
java.lang.String |
getContentType()
Gets the content type.
|
java.sql.Timestamp |
getCreateTime()
Gets the creation time.
|
java.lang.String |
getDocumentId()
Gets the document identifier.
|
java.lang.String |
getDocumentName()
Gets the document name.
|
DocumentType |
getDocumentType()
Gets the document type.
|
com.ibm.spe.core.context.IDocExtension |
getExtension(java.lang.String name,
boolean forceLoad)
Gets the named extension associated with this Document object.
|
java.util.Map<java.lang.String,com.ibm.spe.core.context.IDocExtension> |
getExtensions()
Gets the document extensions Map.
|
java.io.InputStream |
getInputStream()
Gets the input stream for this document.
|
java.io.OutputStream |
getOutputStream()
Gets the output stream for this document.
|
java.lang.String |
getPreviousDocumentId()
Gets the previous document identifier.
|
long |
getSize()
Gets the document size.
|
java.lang.String |
getStorageId()
Gets the storage identifier.
|
IResource |
getStorageResource()
Gets the document storage resource for this document.
|
java.lang.String |
getSubject()
Gets the subject.
|
java.lang.String |
getTrackingID()
Gets the tracking identifier.
|
com.ibm.spe.core.doctracking.TrackingRecord |
getTrackingRecord()
Gets the TrackingRecord.
|
com.ibm.spe.core.doctracking.TrackingRecord |
initTracking(com.ibm.spe.core.context.SPEContext spc,
boolean forceInit,
boolean disableInheritace)
Initializes the tracking.
|
boolean |
isMarkForDelete()
Retrieves the delete status for a document.
|
boolean |
isTrackingEnabled()
Determines if tracking is enabled.
|
void |
markForDelete(boolean flag)
Sets the delete status for the document.
|
boolean |
persist()
Persists this document.
|
com.ibm.spe.core.context.IDocExtension |
removeExtension(java.lang.String name)
Removes the named document extension.
|
void |
setAckFlag(AckFlag ackFlag)
Sets the functional acknowledgment flag.
|
void |
setBody(byte[] body)
Sets the document body.
|
void |
setBodyName(java.lang.String bodyName)
Sets the body name.
|
void |
setCharEncoding(java.lang.String encoding)
Sets document encoding.
|
void |
setContentSubType(java.lang.String contentSubType)
Sets the content sub type.
|
void |
setContentType(java.lang.String contentType)
Sets the content type.
|
void |
setDocumentName(java.lang.String docName)
Sets the document name.
|
void |
setDocumentType(DocumentType docType)
Sets the document type.
|
void |
setSize(long size)
Sets the document size.
|
void |
setSubject(java.lang.String subject)
Sets the subject.
|
void |
setTrackingID(java.lang.String id)
Sets the tracking identifier.
|
void |
track(java.lang.String name,
java.lang.String value,
java.lang.String scope)
Adds the provided correlation tracking information to this document.
|
boolean persist() throws java.io.IOException
true
if persisted, otherwise false
.java.io.IOException
- if an error occurs.IResource getStorageResource()
java.lang.String getDocumentId()
java.lang.String getStorageId()
void setDocumentType(DocumentType docType)
docType
- The document type to set.DocumentType getDocumentType()
void setAckFlag(AckFlag ackFlag)
ackFlag
- The functional acknowledgment to set.AckFlag getAckFlag()
void setSubject(java.lang.String subject)
subject
- The subject to set.java.lang.String getSubject()
void setContentType(java.lang.String contentType)
contentType
- The content type to set.java.lang.String getContentType()
void setContentSubType(java.lang.String contentSubType)
contentSubType
- The content sub type to set.java.lang.String getContentSubType()
java.lang.String getPreviousDocumentId()
void setBodyName(java.lang.String bodyName)
bodyName
- The body name to set.java.lang.String getBodyName()
void setCharEncoding(java.lang.String encoding)
encoding
- The document encoding to set.java.lang.String getCharEncoding()
void setDocumentName(java.lang.String docName)
docName
- The document name to set.java.lang.String getDocumentName()
java.sql.Timestamp getCreateTime()
IDocument copyDocument() throws java.io.IOException
java.io.IOException
- if an error occurs.IDocument copyDocument(boolean shareDocumentBody) throws java.io.IOException
shareDocumentBody
- A boolean, if true
then the source document body is shared with the copy.
Otherwise, if false
then the copy will have its own storage area with a copy of the document body.java.io.IOException
- if an error occurs.void setSize(long size)
size
- The size to set.long getSize()
void addExtension(java.lang.String name, com.ibm.spe.core.context.IDocExtension ext)
name
- The extension key.ext
- The extension to add.com.ibm.spe.core.context.IDocExtension removeExtension(java.lang.String name) throws java.io.IOException
name
- The document extension name (key).java.io.IOException
- if an error occurs.com.ibm.spe.core.context.IDocExtension getExtension(java.lang.String name, boolean forceLoad) throws java.io.IOException
name
- The extension key.forceLoad
- Determines whether to force a new load from the database.java.io.IOException
- if an error occurs.java.util.Map<java.lang.String,com.ibm.spe.core.context.IDocExtension> getExtensions()
java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
- If an error occurs.java.io.OutputStream getOutputStream() throws java.io.IOException
java.io.IOException
- if an error occurs.void setBody(byte[] body) throws java.io.IOException
body
- The data to set in the document body.java.io.IOException
- if an error occurs.byte[] getBody() throws java.io.IOException
java.io.IOException
- if an error occurs.boolean isTrackingEnabled()
true
if tracking is enabled, otherwise false
.void setTrackingID(java.lang.String id)
id
- The tracking identifier to set.java.lang.String getTrackingID()
com.ibm.spe.core.doctracking.TrackingRecord getTrackingRecord()
com.ibm.spe.core.doctracking.TrackingRecord initTracking(com.ibm.spe.core.context.SPEContext spc, boolean forceInit, boolean disableInheritace)
spc
- The SPEContext.forceInit
- Sets the tracking flag for subsequent calls to isTrackingEnabled.disableInheritace
- Determines whether to re-initialize the TrackingRecord.void track(java.lang.String name, java.lang.String value, java.lang.String scope) throws TrackingException
name
- The correlation name.value
- The correlation value.scope
- The correlation scope.TrackingException
- if an error occurs adding the tracking information.void deleteUnpersisted()
org.w3c.dom.Document getBodyAsLocalDOM() throws java.lang.Exception
org.w3c.dom.Document
.java.lang.Exception
- if an error occurs.void markForDelete(boolean flag)
flag
- A boolean, if true
then the document is marked for deletion.boolean isMarkForDelete()
true
then the document is marked for deletion. Otherwise, false
.boolean existInDB()
true
then the document exists in the database. Otherwise, false
.Copyright © IBM Corporation 2013 - 2015. All Rights Reserved.