|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.wm.app.tn.util.TNFixedData
com.wm.app.tn.doc.BizDocType
com.wm.app.tn.doc.FFDocType
public class FFDocType
This class maintains information about flat file document types. When TN is being configured, instances of this class
are created and saved. Each one represents a type of flat file document. At runtime, when a document is sent in to
TN, the instances of this class are used to determine which types of flat file documents match the incoming data.
This is TN's document recognition process. If one instance of FFDocType is found to match the incoming data, that
instance is used to create a BizDocEnvelope
(a "bizdoc"). The recognition criteria for flat files
consists entirely of pipeline matching values.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData |
---|
com.wm.app.tn.util.TNFixedData.TreeCursor |
Constructor Summary | |
---|---|
FFDocType()
Used by TN to revive instances from persistent storage. |
Method Summary | |
---|---|
java.lang.String |
attributesListToString()
|
void |
compare(BizDocType oldType,
BizDocType newType,
java.util.Vector<ActivityLogEntry> logs)
|
BizDocType |
copy()
Creates a shallow copy of an FFDocType. |
static com.wm.data.IData |
create()
Needed for the IDataCodable implementation. |
BizDocEnvelope |
createEnvelope(com.wm.data.IData in)
Creates a BizDocEnvelope for a flat file document and initializes it from the pipeline in . |
com.wm.data.IData |
createPipeline(BizDocEnvelope bizdoc)
Factory method for creating a pipeline from the given BizDoc. |
byte[] |
getContentBytes(BizDocEnvelope bizdoc)
Returns content of a bizdoc. |
java.lang.String |
getContentEncoding(BizDocEnvelope bizdoc)
Returns the content encoding of a flat file bizdoc. |
java.lang.String |
getContentType(BizDocEnvelope bizdoc)
Returns the content-type of a flat file bizdoc. |
java.lang.Object |
getDeliveryContent(BizDocEnvelope bizdoc)
Gets delivery content for the given envelope. |
java.lang.String |
getDisplayName()
Used by the TN Console. |
static byte[] |
getDocumentContent(com.wm.data.IData in,
BizDocEnvelope env)
Get the content bytes from input pipeline. |
java.lang.String |
getEditorName()
Used by the TN Console. |
java.lang.String |
getFtpFileExtension(BizDocEnvelope bizdoc)
Gets the file extension for FTP transport. |
com.wm.data.IData |
getIData()
Returns the class as a IData object. |
java.lang.String |
getParsingSchema()
|
BizDocAttributeTransform |
getSystemAttribute(java.lang.String id)
Returns the requested system attribute, within its attribute transformer. |
java.util.Enumeration<java.lang.String> |
getSystemAttributeIds()
This method overrides implementation in BizDocType and Enumerates List of System attribut IDs. |
com.wm.data.IData |
getValidationInputs()
Returns the user-supplied settings that control flat file parsing behavior. |
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). |
java.lang.String |
pipelineDataToString()
|
boolean |
recognize(com.wm.data.IData in)
Recognizes the pipeline in as a specific instance of an FFDocType. |
void |
removeAllAttributes()
Removes all system and user attributes. |
static com.wm.data.IData |
s_createPipeline(BizDocEnvelope bizdoc)
Creates a pipeline from a BizDocEnvelope. |
static boolean |
s_isType(com.wm.data.IData in)
Determines if the pipeline in contains a flat file document. |
void |
setContentBytes(BizDocEnvelope env,
byte[] data)
Sets content of a bizdoc. |
void |
setContentType(com.wm.data.IData in)
|
void |
setIData(com.wm.data.IData idata)
Sets the attributes of the class based on a IData object. |
void |
setParsingSchema(java.lang.String s)
Sets the name of the NSRecord used to turn docs of this type into records. |
void |
setSystemAttribute(BizDocAttributeTransform bdat)
Sets a system attribute and its attribute transformer. |
void |
setValidationInputs(com.wm.data.IData in)
Sets the user-supplied settings that control flat file parsing behavior. |
java.lang.String |
toString()
Default toString implementation returns class name followed by contents. |
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 |
Constructor Detail |
---|
public FFDocType()
Method Detail |
---|
public static boolean s_isType(com.wm.data.IData in)
in
contains a flat file document. Simply looks for for a key of "ffdata"
in the pipeline, with an InputStream for a value.
in
- a pipeline
public boolean isType(com.wm.data.IData in)
BizDocType
isType
in class BizDocType
in
- IData object containing keyword and data for particular document type
public boolean recognize(com.wm.data.IData in)
in
as a specific instance of an FFDocType. Recognition for FFDocType
consists entirely of pipeline matching. The pipeline matching criteria are compared to the elements within the
TN_parms IData at the root of the pipeline, as described in the Building Your Network document. If
no pipline matching criteria is specified for a doctype, this method will return false
.
recognize
in class BizDocType
in
- a pipeline
true
if in
matches the specified criteria, otherwise false
.BizDocType.addPipelineMatch(java.lang.String,java.lang.String)
,
BizDocType.removePipelineMatch(java.lang.String)
public BizDocEnvelope createEnvelope(com.wm.data.IData in) throws BizDocTypeException
in
.
createEnvelope
in class BizDocType
in
- input IData containing the document
BizDocTypeException
public static byte[] getDocumentContent(com.wm.data.IData in, BizDocEnvelope env) throws BizDocTypeException
BizDocTypeException
public static com.wm.data.IData s_createPipeline(BizDocEnvelope bizdoc) throws BizDocTypeException
bizdoc
- a BizDocEnvelope
bizdoc
.
BizDocTypeException
public com.wm.data.IData createPipeline(BizDocEnvelope bizdoc) throws BizDocTypeException
BizDocType
createPipeline
in class BizDocType
bizdoc
- input BizDocEnvelope
BizDocTypeException
public BizDocType copy()
this
are
copied into it.
copy
in class BizDocType
public byte[] getContentBytes(BizDocEnvelope bizdoc)
OutofMemoryError
. Instead, use the getDeliveryContent
method.
getContentBytes
in class BizDocType
bizdoc
- the document whose contents are to be returned
null
if there is no "ffdata" content part.getDeliveryContent(com.wm.app.tn.doc.BizDocEnvelope)
public void setContentBytes(BizDocEnvelope env, byte[] data)
env
and populates it with data
.
setContentBytes
in class BizDocType
bizdoc
- BizDoc to set the contentsdata
- the contentpublic java.lang.Object getDeliveryContent(BizDocEnvelope bizdoc) throws java.io.IOException
getDeliveryContent
in class BizDocType
bizdoc
- BizDocEnvelope to get the delivery content from
byte[]
. For large documents, the return value will be an InputStream
.
java.io.IOException
public void setSystemAttribute(BizDocAttributeTransform bdat) throws BizDocTypeException
bdat
- The transformer that contains the BizDocAttribute and the attribute transformation details.
BizDocTypeException
public BizDocAttributeTransform getSystemAttribute(java.lang.String id)
id
- Identifier of the atttribute to return.
public void removeAllAttributes()
removeAllAttributes
in class BizDocType
public java.lang.String getFtpFileExtension(BizDocEnvelope bizdoc)
getFtpFileExtension
in class BizDocType
bizdoc
- BizDocEnvelope to get the ftp file extension
public java.lang.String getDisplayName()
getDisplayName
in class BizDocType
public java.lang.String getEditorName()
getEditorName
in class BizDocType
public java.lang.String getContentType(BizDocEnvelope bizdoc)
getContentType
in class BizDocType
bizdoc
- BizDocEnvelope whose content type is to be returned
type; encoding
. If the bizdoc does not contain an "ffdata"
BizDocContentPart, null is returned.public java.lang.String getContentEncoding(BizDocEnvelope bizdoc)
bizdoc
- BizDocEnvelope whose content encoding is to be returned
public java.util.Enumeration<java.lang.String> getSystemAttributeIds()
getSystemAttributeIds
in class BizDocType
public java.lang.String getParsingSchema()
public void setParsingSchema(java.lang.String s)
s
- the name of the NSRecord used to turn docs of this type into recordspublic com.wm.data.IData getValidationInputs()
public void setValidationInputs(com.wm.data.IData in)
public java.lang.String attributesListToString()
public java.lang.String pipelineDataToString()
public java.lang.String toString()
com.wm.app.tn.util.TNFixedData
toString
in class com.wm.app.tn.util.TNFixedData
public void compare(BizDocType oldType, BizDocType newType, java.util.Vector<ActivityLogEntry> logs)
compare
in class BizDocType
logs
- the new logs will be added.priorDocType
- the previous value before update operation takes place.newDocType
- the new value against which previous value will be compared.public com.wm.data.IData getIData()
getIData
in interface com.wm.util.coder.IDataCodable
getIData
in class BizDocType
public void setIData(com.wm.data.IData idata)
setIData
in interface com.wm.util.coder.IDataCodable
setIData
in class BizDocType
idata
- IData object containing values for class attributespublic static com.wm.data.IData create()
public void setContentType(com.wm.data.IData in)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |