com.wm.app.tn.doc
Class BizDocType

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

public abstract class BizDocType
extends TNFixedData
implements com.wm.util.coder.IDataCodable

Abstract class for business document types. Actual doc types used in the recognition engine should subclass this class. The important methods to be overridden include isType(), recognize() and createEnvelope(). Subclasses also need to supply the IDataCodable methods (e.g., setIData() and getIData()) so that subclass specific information can be stored in the database and re-constituted from the database at run-time. The createEnvelope() method is the factory method for creating a BizDocEnvelope and should be the only place where bizdocs are created. The IDataCodable methods can be used for converting subclassed objects into IData objects and vice versa. This is useful for peristing it in the database. By using the IDataCodable methods in this way, member variables can easily be added without having to change the data model. A no-arg constructor should exist for each concrete subclass. This allows the IDataCoder to instantiate objects that were "put" in an IData object without having to "put" the object's IData. ex. put(key, MY_BIZDOC_TYPE_OBJECT) instead of put(key, MY_BIZDOCTYPE_OBJECT.getIData());


Nested Class Summary
 
Nested classes/interfaces inherited from class com.wm.app.tn.util.TNFixedData
TNFixedData.TreeCursor
 
Method Summary
 void addBAMAttribute(java.lang.String key, com.wm.data.IData value)
          Add a monitoring attribute.
 void addPipelineMatch(java.lang.String key, java.lang.String value)
          Add a pipeline matching criterion.
abstract  void compare(BizDocType priorDocType, BizDocType newDocType, java.util.Vector<ActivityLogEntry> logs)
           
abstract  BizDocType copy()
          Abstract method for copying one BizDocType to another.
static ActivityLogEntry createActivityLog(java.lang.String operation, java.lang.String fieldname, java.lang.String oldValue, java.lang.String newValue, java.lang.String docTypeID)
          Return new message entry comprising of full and brief message.
abstract  BizDocEnvelope createEnvelope(com.wm.data.IData in)
          Factory method for creating new BizDocs of this type.
abstract  com.wm.data.IData createPipeline(BizDocEnvelope bizdoc)
          Factory method for creating a pipeline from the given BizDoc.
 boolean determineSenderFromSession()
          Retrieves the setting that indicates whether to use the connected user to determine the sender of the document during recognition.
 BizDocAttribute getAttribute(java.lang.String id)
           
 java.util.Enumeration getAttributeIds()
           
 BizDocAttributeTransform getAttributeTransform(java.lang.String id)
           
 java.lang.String getBAMAction()
           
 java.util.Vector<java.lang.String> getBAMDocTypeDependency()
           
 java.lang.String getBAMDocTypeMapping()
           
 java.lang.String getBAMEventMap()
           
 java.lang.String getBAMEventMapName()
           
 com.wm.data.IData getBAMMonitoringAttributes()
          For internal use only
abstract  byte[] getContentBytes(BizDocEnvelope bizdoc)
          Abstract method to get content of a bizdoc In general, this is called from the BizDocEnvelope.getContentBytes.
abstract  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
 java.lang.String getDescription()
           
 java.lang.String getDisplayName()
          Returns a name that will be displayed on the TN Console.
 java.lang.String getEditorName()
          Returns the name of the editor used to by the TN Console to create and modify instances of a doctype.
 java.io.Reader getFormattedContentPart(BizDocEnvelope bizdoc, java.lang.String partName)
           
 java.lang.String getFtpFileExtension(BizDocEnvelope bizdoc)
          Get file extension for FTP transport
 java.lang.String getId()
           
 com.wm.data.IData getIData()
          IDataCodable implementation.
 java.sql.Timestamp getLastModifiedTime()
           
 java.lang.String getName()
           
 com.wm.data.IData getPipelineMatchIData()
          For internal use only
 PreRoutingFlags getPreRoutingFlags()
           
 com.wm.lang.ns.NSName getSigningService()
           
 java.lang.String getSubDocTypeID()
           
 java.util.Enumeration<java.lang.String> getSystemAttributeIds()
           
 java.lang.String getType()
           
 com.wm.lang.ns.NSName getValidationService()
           
 com.wm.lang.ns.NSName getVerificationService()
           
 java.lang.String getVersion()
          returns the version number of this document type.
 boolean isAttributeListEventOption()
           
 boolean isAttributeRequired(java.lang.String id)
           
 boolean isDeleted()
           
 boolean isFormattedContentPart(BizDocEnvelope bizdoc, java.lang.String partName)
           
 boolean isHidden()
           
 boolean isMonitored()
          Retrieves the setting that indicates whether to doctype has been set for BAM monitoring or not.
 boolean isRoutable()
           
abstract  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).
 void monitor(boolean b)
          Indicates whether to use the doctype is set for bam monitoring.
 BizDocEnvelope newEnvelope()
          Factory method for creating new uninitialized BizDocs of this type.
 boolean pipelineMatch(com.wm.data.IData in)
          Performs pipeline matching on an IData.
abstract  boolean recognize(com.wm.data.IData in)
          Abstract method for determining if the data in IData is a particular document type.
 void removeAllAttributes()
          Remove all associated attributes.
 void removeAttribute(BizDocAttribute attr)
          Remove a attribute.
 void removeBAMAttribute(java.lang.String key)
          Remove a BAM Attribute.
 void removePipelineMatch(java.lang.String key)
          Remove a pipeline match criterion.
 void setAttribute(BizDocAttribute attr)
          Associates documents of this type with a BizDocAttribute
 void setAttribute(BizDocAttribute attr, boolean required)
          Associates documents of this type with a BizDocAttribute
 void setAttributeRequirement(java.lang.String id, boolean required)
          Set the requirement for an attribute.
 void setAttributeTransform(BizDocAttribute bda, boolean required, int fn, java.lang.String[] args)
           
 void setAttributeTransform(BizDocAttribute bda, int fn, java.lang.String[] args)
          Associates documents of this type with a BizDocAttribute, and a transformation function.
 void setAttributeTransform(BizDocAttributeTransform bdat)
          Associates documents of this type with a BizDocAttributeTransform (this specifies both an attribute and a transformation function to apply to it).
 void setBAMAction(java.lang.String action)
          Set the BAM Action (for firing the event)
 void setBAMDocTypeDependency(java.util.Vector<java.lang.String> bamDocTypeDependency)
          Set the docTypes dependent on this doctype for bam monitoring configuration - for BAM Monitoring
 void setBAMDocTypeMapping(java.lang.String bamDocTypeMapping)
          Set the event option when attribute list is available - for BAM Monitoring
 void setBAMEventMap(java.lang.String name)
          Set the BAM EventMap type name (should only be called once)
 void setBAMEventMapName(java.lang.String name)
          Set the Internal BAM EventMap type name (should only be called once)
 void setBAMEventOptionForAttrList(java.lang.String eventOption)
          Set the event option when attribute list is available - for BAM Monitoring
 void setBAMMonitoringAttributes(com.wm.data.IData monitoringAttributes)
          For internal use only
abstract  void setContentBytes(BizDocEnvelope bizdoc, byte[] data)
          Abstract method to set the content bytes.
 void setDeleted(boolean b)
          Flag this document as deleted
 void setDescription(java.lang.String description)
          Set the type description (should only be called once)
 void setDetermineSenderFromSession(boolean b)
          Indicates whether to use the connected user to determine the sender of the document during recognition.
 void setHidden(boolean b)
          Flag this document as deleted
 void setId(java.lang.String id)
          Set the type ID (should only be called once)
 void setIData(com.wm.data.IData data)
          IDataCodable implementation.
 void setLastModifiedTime(java.sql.Timestamp time)
          Set the last mod time
 void setName(java.lang.String name)
          Set the type name (should only be called once)
 void setPipelineMatchIData(com.wm.data.IData pipematch)
          For internal use only
 void setPreRoutingFlags(PreRoutingFlags fl)
          Set the pre-routing flags for documents of this type (can be overridden in routing rules)
 void setReceiveSvc(com.wm.data.IData in, BizDocEnvelope bde)
          Support for resubmit: extract TN_parms/$receiveSvc from the pipeline "in" and calls BizDocEnvelope.setReceiveSvc().
 void setRouting(boolean b)
          Flag this document to route
 void setSigningService(com.wm.lang.ns.NSName svc)
          Set the signing service for documents of this type
 void setSubDocTypeID(java.lang.String subDocId)
          Set the sub document type id of the document
 void setType(java.lang.String type)
          Set the type of the document (EDI/XML/UNKNOWN/FF)
 void setValidationService(com.wm.lang.ns.NSName svc)
          Set the validation service for documents of this type
 void setVerificationService(com.wm.lang.ns.NSName svc)
          Set the verification service for documents of this type
 void setVersion(java.lang.String version)
          Sets version of this document type.
 
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
 

Method Detail

getId

public java.lang.String getId()
Returns:
the ID of this type

getName

public java.lang.String getName()
Returns:
the name of this type

getDescription

public java.lang.String getDescription()
Returns:
the description of this type

isDeleted

public boolean isDeleted()
Returns:
is this document type really deleted?

isHidden

public boolean isHidden()
Returns:
is this document type hidden?

isRoutable

public boolean isRoutable()
Returns:
is this document type routable?

getLastModifiedTime

public java.sql.Timestamp getLastModifiedTime()
Returns:
the time this document was last modified

getPreRoutingFlags

public PreRoutingFlags getPreRoutingFlags()
Returns:
the pre-routing flags for documents of this type

isAttributeRequired

public boolean isAttributeRequired(java.lang.String id)
Returns:
whether or not the attribute is required for this type

getDisplayName

public java.lang.String getDisplayName()
Returns a name that will be displayed on the TN Console. Subclasses should override this method.

Returns:
a name that will be displayed on the Console for the class

getEditorName

public java.lang.String getEditorName()
Returns the name of the editor used to by the TN Console to create and modify instances of a doctype. You must override this method if your BizDocType sublass is to be editable in the TN Console.

Returns:
fully qualified class name of the doctype editor

getBAMEventMap

public java.lang.String getBAMEventMap()
Returns:
the name of the BAM EventType the doctype is mapped to

getBAMAction

public java.lang.String getBAMAction()
Returns:
the BAM Action

getBAMEventMapName

public java.lang.String getBAMEventMapName()
Returns:
the name of the Internal BAM EventType the doctype is mapped to

getSubDocTypeID

public java.lang.String getSubDocTypeID()
Returns:
the sub document type id of the document

getBAMDocTypeMapping

public java.lang.String getBAMDocTypeMapping()
Returns:
the bam document type mapping, if any

getBAMDocTypeDependency

public java.util.Vector<java.lang.String> getBAMDocTypeDependency()
Returns:
the document types dependent on this docType for monitoring configuration, if any

isAttributeListEventOption

public boolean isAttributeListEventOption()
Returns:
whether or not the attribute list allows creating multiple events - for BAM Monitoring

getType

public java.lang.String getType()
Returns:
the document type of the document

setId

public void setId(java.lang.String id)
Set the type ID (should only be called once)


setName

public void setName(java.lang.String name)
Set the type name (should only be called once)


setDescription

public void setDescription(java.lang.String description)
Set the type description (should only be called once)


setDeleted

public void setDeleted(boolean b)
Flag this document as deleted


setHidden

public void setHidden(boolean b)
Flag this document as deleted


setRouting

public void setRouting(boolean b)
Flag this document to route


setDetermineSenderFromSession

public void setDetermineSenderFromSession(boolean b)
Indicates whether to use the connected user to determine the sender of the document during recognition. If true, the sender's identity will be determined from the account of the user that sent the document.

Parameters:
b - true means use connected user as the sender

determineSenderFromSession

public boolean determineSenderFromSession()
Retrieves the setting that indicates whether to use the connected user to determine the sender of the document during recognition.

Returns:
true if the connected user will be used to determine the sender, otherwise false.

monitor

public void monitor(boolean b)
Indicates whether to use the doctype is set for bam monitoring. If true, the monitored attributes and respective values are picked up from the doctype and a event is added to Optimize when the routing is successful

Parameters:
b - true means doctype is enabled for doctype

isMonitored

public boolean isMonitored()
Retrieves the setting that indicates whether to doctype has been set for BAM monitoring or not.

Returns:
true if the doctype has been set for BAM Monitoring, otherwise false.

setLastModifiedTime

public void setLastModifiedTime(java.sql.Timestamp time)
Set the last mod time


setPreRoutingFlags

public void setPreRoutingFlags(PreRoutingFlags fl)
Set the pre-routing flags for documents of this type (can be overridden in routing rules)


setBAMEventMap

public void setBAMEventMap(java.lang.String name)
Set the BAM EventMap type name (should only be called once)


setBAMAction

public void setBAMAction(java.lang.String action)
Set the BAM Action (for firing the event)


setBAMEventMapName

public void setBAMEventMapName(java.lang.String name)
Set the Internal BAM EventMap type name (should only be called once)


setSubDocTypeID

public void setSubDocTypeID(java.lang.String subDocId)
Set the sub document type id of the document


setBAMEventOptionForAttrList

public void setBAMEventOptionForAttrList(java.lang.String eventOption)
Set the event option when attribute list is available - for BAM Monitoring


setBAMDocTypeMapping

public void setBAMDocTypeMapping(java.lang.String bamDocTypeMapping)
Set the event option when attribute list is available - for BAM Monitoring


setBAMDocTypeDependency

public void setBAMDocTypeDependency(java.util.Vector<java.lang.String> bamDocTypeDependency)
Set the docTypes dependent on this doctype for bam monitoring configuration - for BAM Monitoring


setType

public void setType(java.lang.String type)
Set the type of the document (EDI/XML/UNKNOWN/FF)


getValidationService

public com.wm.lang.ns.NSName getValidationService()
Returns:
the validation service for this document

getVerificationService

public com.wm.lang.ns.NSName getVerificationService()
Returns:
the verification service for this document

getSigningService

public com.wm.lang.ns.NSName getSigningService()
Returns:
the signing service for this document

setValidationService

public void setValidationService(com.wm.lang.ns.NSName svc)
Set the validation service for documents of this type


setVerificationService

public void setVerificationService(com.wm.lang.ns.NSName svc)
Set the verification service for documents of this type


setSigningService

public void setSigningService(com.wm.lang.ns.NSName svc)
Set the signing service for documents of this type


getAttributeTransform

public BizDocAttributeTransform getAttributeTransform(java.lang.String id)
Returns:
attribute transform information (may be null)

getAttribute

public BizDocAttribute getAttribute(java.lang.String id)
Returns:
a BizDocAttribute associated with this type (may be null)

getAttributeIds

public java.util.Enumeration getAttributeIds()
Returns:
a list of attributes associated with docs of this type

getSystemAttributeIds

public java.util.Enumeration<java.lang.String> getSystemAttributeIds()
Returns:
a list of system attributes associated with docs of this type

setAttribute

public void setAttribute(BizDocAttribute attr)
Associates documents of this type with a BizDocAttribute

Parameters:
attr - attribute for this BizDocType

setAttribute

public void setAttribute(BizDocAttribute attr,
                         boolean required)
Associates documents of this type with a BizDocAttribute

Parameters:
attr - attribute for this BizDocType

removeAttribute

public void removeAttribute(BizDocAttribute attr)
Remove a attribute.

Parameters:
attr - attribute to remove

removeAllAttributes

public void removeAllAttributes()
Remove all associated attributes.


setAttributeRequirement

public void setAttributeRequirement(java.lang.String id,
                                    boolean required)
Set the requirement for an attribute. If the attribute must be extracted for this BizDocType to be considered complete then set required to "true". Otherwise, if it does not matter then set required to "false".

Parameters:
id - ID of the attribute
required - requirement setting for this attribute

setAttributeTransform

public void setAttributeTransform(BizDocAttribute bda,
                                  int fn,
                                  java.lang.String[] args)
Associates documents of this type with a BizDocAttribute, and a transformation function. For example, an attribute of interest may be a "Total Cost" and the transformation function would be a SUM.

Parameters:
bda - BizDocAttribute to associate with the transformation
fn - transformation function number (use constants from BizDocAttributeTransform)
args - additional arguments for the transformation function

setAttributeTransform

public void setAttributeTransform(BizDocAttribute bda,
                                  boolean required,
                                  int fn,
                                  java.lang.String[] args)

setAttributeTransform

public void setAttributeTransform(BizDocAttributeTransform bdat)
Associates documents of this type with a BizDocAttributeTransform (this specifies both an attribute and a transformation function to apply to it).

Parameters:
bdat - attribute transform to use

getContentType

public abstract java.lang.String getContentType(BizDocEnvelope bizdoc)
Abstract method for determining the content-type of the bizdoc (eg, text/xml).

Parameters:
bizdoc - BizDoc to test
Returns:
the content-type of the bizdoc

createEnvelope

public abstract BizDocEnvelope createEnvelope(com.wm.data.IData in)
                                       throws BizDocTypeException
Factory method for creating new BizDocs of this type. Subclasses must redefine this to do type-specific initialization.

Parameters:
in - input IData for the document in question
Returns:
a new BizDocEnvelope of this type
Throws:
BizDocTypeException

createPipeline

public abstract com.wm.data.IData createPipeline(BizDocEnvelope bizdoc)
                                          throws BizDocTypeException
Factory method for creating a pipeline from the given BizDoc. Subclasses must redefine this to do type-specific initialization.

Parameters:
bizdoc - input BizDocEnvelope
Returns:
the IData representation of the given envelope
Throws:
BizDocTypeException

newEnvelope

public BizDocEnvelope newEnvelope()
Factory method for creating new uninitialized BizDocs of this type. Subclasses may redefine this to do type-specific initialization.

Returns:
a new BizDoc

copy

public abstract BizDocType copy()
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.


isType

public abstract 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). 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.

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 abstract boolean recognize(com.wm.data.IData in)
                           throws BizDocTypeException
Abstract method for determining if the data in IData is a particular document type. This is truly an instance method (as opposed to isType).

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

getContentBytes

public abstract byte[] getContentBytes(BizDocEnvelope bizdoc)
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()

Parameters:
bizdoc - BizDoc to get the contents
Returns:
the bizdoc content as a byte[]

setContentBytes

public abstract void setContentBytes(BizDocEnvelope bizdoc,
                                     byte[] data)
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.

Parameters:
bizdoc - BizDoc to set the contents
data - the document content byte[]

getFormattedContentPart

public java.io.Reader getFormattedContentPart(BizDocEnvelope bizdoc,
                                              java.lang.String partName)
Returns:
formatted content part data as Reader

isFormattedContentPart

public boolean isFormattedContentPart(BizDocEnvelope bizdoc,
                                      java.lang.String partName)
Returns:
true for certain EDI doc content parts

setVersion

public void setVersion(java.lang.String version)
Sets version of this document type.

Parameters:
version - is the version number that needs to be set on this document type. You can get the current TN version from com.wm.app.tn.util.TNBuild.getVersion()

getVersion

public java.lang.String getVersion()
returns the version number of this document type.


getDeliveryContent

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

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 this class provides a no-op implementation only. sub-classes should override this method and provide a suitable implementation.
Throws:
java.io.IOException

getFtpFileExtension

public java.lang.String getFtpFileExtension(BizDocEnvelope bizdoc)
Get file extension for FTP transport

Parameters:
bizdoc - BizDocEnvelope to get the ftp file extension
Returns:
the file extention this class provides a no-op implementation only. sub-classes should override this method and provide a suitable implementation.

getIData

public com.wm.data.IData getIData()
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
Returns:
a representation of this doc type as an IData object

setIData

public void setIData(com.wm.data.IData data)
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
Parameters:
data - a representation of this doc type as an IData object

addPipelineMatch

public void addPipelineMatch(java.lang.String key,
                             java.lang.String value)
Add a pipeline matching criterion.

Parameters:
key - is the pipeline variable to be matched against
value - is the value of the pipeline variable to match with. Value can be null. If value is null, then we just check the existence of the pipeline variable

removePipelineMatch

public void removePipelineMatch(java.lang.String key)
Remove a pipeline match criterion.

Parameters:
key - the key to be removed from pipeline match criterion

getPipelineMatchIData

public com.wm.data.IData getPipelineMatchIData()
For internal use only


setPipelineMatchIData

public void setPipelineMatchIData(com.wm.data.IData pipematch)
For internal use only


pipelineMatch

public boolean pipelineMatch(com.wm.data.IData in)
Performs pipeline matching on an IData.

Parameters:
in - the IData on which to match
Returns:
true if all criteria match, otherwise false.

addBAMAttribute

public void addBAMAttribute(java.lang.String key,
                            com.wm.data.IData value)
Add a monitoring attribute.

Parameters:
key - is the attribute variable
value - is the value of the IData which explains about the attribute related particularly to the eventMap. Value cannot be null. If value is null, then we just don't add the attribute for monitoring

removeBAMAttribute

public void removeBAMAttribute(java.lang.String key)
Remove a BAM Attribute.

Parameters:
key - the key to be removed from BAM Attributes

setBAMMonitoringAttributes

public void setBAMMonitoringAttributes(com.wm.data.IData monitoringAttributes)
For internal use only


getBAMMonitoringAttributes

public com.wm.data.IData getBAMMonitoringAttributes()
For internal use only


setReceiveSvc

public void setReceiveSvc(com.wm.data.IData in,
                          BizDocEnvelope bde)
Support for resubmit: extract TN_parms/$receiveSvc from the pipeline "in" and calls BizDocEnvelope.setReceiveSvc().

Parameters:
in - - an IData object
bizdoc - - an BizDocEnvelope object

createActivityLog

public static ActivityLogEntry createActivityLog(java.lang.String operation,
                                                 java.lang.String fieldname,
                                                 java.lang.String oldValue,
                                                 java.lang.String newValue,
                                                 java.lang.String docTypeID)
Return new message entry comprising of full and brief message.

Parameters:
operation - the type of operation performed i.e, insert or update
fieldname - the name that needs to be displayed in message
oldValue - the previous value before update operation takes place (It will be null in case of insert operation)
newValue - the new value against which previous value will be compared.
Returns:
a new message entry

compare

public abstract void compare(BizDocType priorDocType,
                             BizDocType newDocType,
                             java.util.Vector<ActivityLogEntry> logs)