com.wm.app.tn.doc
Class UnknownDocType

java.lang.Object
  extended by com.wm.app.tn.util.TNFixedData
      extended by com.wm.app.tn.doc.BizDocType
          extended by com.wm.app.tn.doc.UnknownDocType
All Implemented Interfaces:
com.wm.data.IData, com.wm.util.coder.IDataCodable, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
RecordDocType

public class UnknownDocType
extends BizDocType

Instances of this class are basically placeholders -- they flag docs that aren't otherwise recognized.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData
com.wm.app.tn.util.TNFixedData.TreeCursor
 
Constructor Summary
UnknownDocType()
           
 
Method Summary
 void compare(BizDocType oldType, BizDocType newType, java.util.Vector<ActivityLogEntry> logs)
           
 BizDocType copy()
          Abstract method for copying one BizDocType to another.
static com.wm.data.IData create()
           
 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)
          Get content of a bizdoc
 java.lang.String getContentType(BizDocEnvelope bizdoc)
          Abstract method for determining the content-type of the bizdoc (eg, text/xml).
 java.lang.Object getDeliveryContent(BizDocEnvelope bizdoc)
          Get delivery content for the given envelope
 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 env, byte[] data)
          Set content of a bizdoc
 
Methods inherited from class com.wm.app.tn.doc.BizDocType
addBAMAttribute, addPipelineMatch, createActivityLog, determineSenderFromSession, getAttribute, getAttributeIds, getAttributeTransform, getBAMAction, getBAMDocTypeDependency, getBAMDocTypeMapping, getBAMEventMap, getBAMEventMapName, getBAMMonitoringAttributes, getDescription, getDisplayName, getEditorName, getFormattedContentPart, getFtpFileExtension, getId, getIData, 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, setIData, 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, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UnknownDocType

public UnknownDocType()
Method Detail

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 (everything is unknown)

recognize

public boolean recognize(com.wm.data.IData in)
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 (everything is unknown)

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 BizDoc with no information in it
Throws:
BizDocTypeException

createPipeline

public com.wm.data.IData createPipeline(BizDocEnvelope bizdoc)
                                 throws BizDocTypeException
Factory method for creating a pipeline from the given BizDoc.

Specified by:
createPipeline in class BizDocType
Parameters:
bizdoc - input BizDocEnvelope
Returns:
the IData representation of the given envelope
Throws:
BizDocTypeException

getContentBytes

public byte[] getContentBytes(BizDocEnvelope bizdoc)
Get content of a bizdoc

Specified by:
getContentBytes in class BizDocType
Parameters:
bizdoc - BizDoc to get the contents
Returns:
the bizdoc content as a byte[]

getDeliveryContent

public java.lang.Object getDeliveryContent(BizDocEnvelope bizdoc)
                                    throws java.io.IOException
Get delivery content for the given envelope

Overrides:
getDeliveryContent in class BizDocType
Parameters:
bizdoc - BizDocEnvelope to get the delivery content from
Returns:
the content of BizDocEnvelope as a java Object for small documents, the return value will be byte[] for large document, the return value will be InputStream
Throws:
java.io.IOException

setContentBytes

public void setContentBytes(BizDocEnvelope env,
                            byte[] data)
Set content of a bizdoc

Specified by:
setContentBytes in class BizDocType
Parameters:
bizdoc, - BizDoc to set the contents
data, - the content

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

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:
content type for this unknown document

create

public static com.wm.data.IData create()
Returns:
the single instance of this type in the system

compare

public void compare(BizDocType oldType,
                    BizDocType newType,
                    java.util.Vector<ActivityLogEntry> logs)
Specified by:
compare in class BizDocType