com.wm.app.tn.doc
Class TestDocType
java.lang.Object
com.wm.app.tn.util.TNFixedData
com.wm.app.tn.doc.BizDocType
com.wm.app.tn.doc.TestDocType
- All Implemented Interfaces:
- com.wm.data.IData, com.wm.util.coder.IDataCodable, java.lang.Cloneable
public class TestDocType
- extends BizDocType
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData |
com.wm.app.tn.util.TNFixedData.TreeCursor |
Method Summary |
void |
compare(BizDocType oldType,
BizDocType newType,
java.util.Vector<ActivityLogEntry> logs)
|
BizDocType |
copy()
Abstract method for copying one BizDocType to another. |
BizDocEnvelope |
createEnvelope(com.wm.data.IData in)
Factory method for creating new BizDocs of this type. |
com.wm.data.IData |
createPipeline(BizDocEnvelope bizdoc)
Factory method for creating a pipeline from the given BizDoc. |
byte[] |
getContentBytes(BizDocEnvelope bizdoc)
Abstract method to get content of a bizdoc In general, this is called from the BizDocEnvelope.getContentBytes. |
java.lang.String |
getContentType(BizDocEnvelope bizdoc)
Abstract method for determining the content-type of the bizdoc (eg, text/xml). |
com.wm.data.IData |
getIData()
IDataCodable implementation. |
boolean |
isType(com.wm.data.IData in)
Abstract method for determining if the IData contains data representing a lower level document type (eg, XML,
EDI, etc). |
boolean |
recognize(com.wm.data.IData in)
Abstract method for determining if the data in IData is a particular document type. |
void |
setContentBytes(BizDocEnvelope bizdoc,
byte[] data)
Abstract method to set the content bytes. |
void |
setDocType(java.lang.String docType)
|
void |
setIData(com.wm.data.IData idata)
IDataCodable implementation. |
java.lang.String |
toString()
Default toString implementation returns class name followed by contents. |
Methods inherited from class com.wm.app.tn.doc.BizDocType |
addBAMAttribute, addPipelineMatch, createActivityLog, determineSenderFromSession, getAttribute, getAttributeIds, getAttributeTransform, getBAMAction, getBAMDocTypeDependency, getBAMDocTypeMapping, getBAMEventMap, getBAMEventMapName, getBAMMonitoringAttributes, getDeliveryContent, getDescription, getDisplayName, getEditorName, getFormattedContentPart, getFtpFileExtension, getId, getLastModifiedTime, getName, getPipelineMatchIData, getPreRoutingFlags, getSigningService, getSubDocTypeID, getSystemAttributeIds, getType, getValidationService, getVerificationService, getVersion, isAttributeListEventOption, isAttributeRequired, isDeleted, isFormattedContentPart, isHidden, isMonitored, isRoutable, monitor, newEnvelope, pipelineMatch, removeAllAttributes, removeAttribute, removeBAMAttribute, removePipelineMatch, setAttribute, setAttribute, setAttributeRequirement, setAttributeTransform, setAttributeTransform, setAttributeTransform, setBAMAction, setBAMDocTypeDependency, setBAMDocTypeMapping, setBAMEventMap, setBAMEventMapName, setBAMEventOptionForAttrList, setBAMMonitoringAttributes, setDeleted, setDescription, setDetermineSenderFromSession, setHidden, setId, setLastModifiedTime, setName, setPipelineMatchIData, setPreRoutingFlags, setReceiveSvc, setRouting, setSigningService, setSubDocTypeID, setType, setValidationService, setVerificationService, setVersion |
Methods inherited from class com.wm.app.tn.util.TNFixedData |
clone, dataSize, get, get, getCursor, getHashCursor, getIndexCursor, getKey, getSharedCursor, getTreeCursor, indexOf, merge, set, set |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TestDocType
public TestDocType()
TestDocType
public TestDocType(com.wm.data.IData in)
isType
public boolean isType(com.wm.data.IData in)
- Description copied from class:
BizDocType
- Abstract method for determining if the IData contains data representing a lower level document type (eg, XML,
EDI, etc). This is really meant to be a class (static) method but you cant override a static. Each subclass must
provide it owns way of determing this. For example, if an XML document then "in" will have a "node" keyword.
- Specified by:
isType
in class BizDocType
- Parameters:
in
- IData object containing keyword and data for particular document type
- Returns:
- true if "in" contains a document of this class type
recognize
public boolean recognize(com.wm.data.IData in)
throws BizDocTypeException
- Description copied from class:
BizDocType
- Abstract method for determining if the data in IData is a particular document type. This is truly an instance
method (as opposed to isType).
- Specified by:
recognize
in class BizDocType
- Parameters:
in
- IData object containing keyword and data for particular document type
- Returns:
- true if "in" contains a document of this document type
- Throws:
BizDocTypeException
createEnvelope
public BizDocEnvelope createEnvelope(com.wm.data.IData in)
throws BizDocTypeException
- Description copied from class:
BizDocType
- Factory method for creating new BizDocs of this type. Subclasses must redefine this to do type-specific
initialization.
- Specified by:
createEnvelope
in class BizDocType
- Parameters:
in
- input IData for the document in question
- Returns:
- a new BizDocEnvelope of this type
- Throws:
BizDocTypeException
createPipeline
public com.wm.data.IData createPipeline(BizDocEnvelope bizdoc)
throws BizDocTypeException
- Description copied from class:
BizDocType
- Factory method for creating a pipeline from the given BizDoc. Subclasses must redefine this to do type-specific
initialization.
- Specified by:
createPipeline
in class BizDocType
- Parameters:
bizdoc
- input BizDocEnvelope
- Returns:
- the IData representation of the given envelope
- Throws:
BizDocTypeException
getContentType
public java.lang.String getContentType(BizDocEnvelope bizdoc)
- Description copied from class:
BizDocType
- Abstract method for determining the content-type of the bizdoc (eg, text/xml).
- Specified by:
getContentType
in class BizDocType
- Parameters:
bizdoc
- BizDoc to test
- Returns:
- the content-type of the bizdoc
getIData
public com.wm.data.IData getIData()
- Description copied from class:
BizDocType
- IDataCodable implementation. If subclasses override this to save additional state, they should always start with
a call to
super.getIData()
.
- Specified by:
getIData
in interface com.wm.util.coder.IDataCodable
- Overrides:
getIData
in class BizDocType
- Returns:
- a representation of this doc type as an IData object
setDocType
public void setDocType(java.lang.String docType)
setIData
public void setIData(com.wm.data.IData idata)
- Description copied from class:
BizDocType
- IDataCodable implementation. If subclasses override this to restore additional state, they should always start
with a call to
super.setIData()
.
- Specified by:
setIData
in interface com.wm.util.coder.IDataCodable
- Overrides:
setIData
in class BizDocType
- Parameters:
idata
- a representation of this doc type as an IData object
toString
public java.lang.String toString()
- Description copied from class:
com.wm.app.tn.util.TNFixedData
- Default toString implementation returns class name followed by contents.
- Overrides:
toString
in class com.wm.app.tn.util.TNFixedData
- Returns:
- string rep for this object
copy
public BizDocType copy()
- Description copied from class:
BizDocType
- Abstract method for copying one BizDocType to another. The concrete method should create a "new" subclassed
BizDocType and copy the contents of the current BizDocType to the new one.
- Specified by:
copy
in class BizDocType
getContentBytes
public byte[] getContentBytes(BizDocEnvelope bizdoc)
- Description copied from class:
BizDocType
- Abstract method to get content of a bizdoc In general, this is called from the BizDocEnvelope.getContentBytes.
The envelope maintains different parts of a document. But, the envelope doesn't have enough knowledge to
re-construct the document as a byte[] from its parts. So, it off-loads this task to the corresponding doctype so
that the doctype can do a better job of re-constructing the original document as a byte[] using its parts. Every
decendant of this class should implement this method, which will re-construct the original document as a byte[]
from the given envelope's parts eg. XmlDocType.getContentBytes()
- Specified by:
getContentBytes
in class BizDocType
- Parameters:
bizdoc
- BizDoc to get the contents
- Returns:
- the bizdoc content as a byte[]
setContentBytes
public void setContentBytes(BizDocEnvelope bizdoc,
byte[] data)
- Description copied from class:
BizDocType
- Abstract method to set the content bytes. This should only be called once and usually is called from the
BizDocEnvelope.setContentBytes. The envelope maintains different parts of a document. But it doesn't have enough
knowledge about the doctype to handle this call So, it off-loads this task to the corresponding doctype Every
descendant of this class should implement this method. Eg. XmlDocType.setContentBytes(), which adds one part the
given envelope.
- Specified by:
setContentBytes
in class BizDocType
- Parameters:
bizdoc
- BizDoc to set the contentsdata
- the document content byte[]
compare
public void compare(BizDocType oldType,
BizDocType newType,
java.util.Vector<ActivityLogEntry> logs)
- Specified by:
compare
in class BizDocType