IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.cs.html.remote
Class RemoteDataMapper

java.lang.Object
  extended by com.ibm.btt.cs.html.remote.RemoteDataMapper

public class RemoteDataMapper
extends java.lang.Object

Data Mapper to map data to remote flow. Make use of current BTT Data Mapper Convert Tag definitions. The map result is store in a HashMap to be used in JSP to create hidden fields to submit.


Field Summary
protected static int APPEND_FALSE
          The false value for the append attribute.
protected static int APPEND_IGNORE
          The ignore value for the append attribute.
protected static int APPEND_TRUE
          The true value for the append attribute.
static java.lang.String Asterisk
           
static java.lang.String ByReference
          The String byReference
static java.lang.String ConversioType
          The String convType
(package private)  Vector elements
           
static java.lang.String From
          The String from
static java.lang.String FromExpression
           
(package private)  Tag myTag
           
(package private)  java.util.HashMap resultMap
           
 
Constructor Summary
RemoteDataMapper(Tag tag, Vector elements1)
           
 
Method Summary
protected  void deepMapSingleIndexedCollectionElements(DataElement fromDataElement, DataElement toDataElement, java.lang.String converType, boolean byReference, int append)
           
protected  void deepMapSingleKeyedCollectionElements(DataElement fromDataElement, DataElement toDataElement, java.lang.String converType, boolean byReference, int append)
           
 java.util.HashMap getResultMap()
           
 void mapContents(Context inputContext, Context outputContext)
          Maps the contents of a context into another context.
protected  void mapContextToContext(Context inputContext, Context outputContext, boolean byReference, java.lang.String converType, int append)
           The alternative for this algorithm is to create two dummy contexts.
protected  void mapContextToKColl(Context inputContext, Context outputContext, java.lang.String toDataField, boolean byReference, java.lang.String converType, int append)
           Since the left (from) is a "*", it means the root keyed collection which is context.getKeyedCollection().
protected  void mapKCollToContext(Context inputContext, Context outputContext, java.lang.String fromDataField, boolean byReference, java.lang.String converType, int append)
           
protected  void mapSingleElement(DataElement fromDataElement, DataElement toDataElement, java.lang.String converType, boolean byReference, int append)
          Maps the contexts of one operation into the context of another operation.
protected  void mapSingleElements(DataElement fromDataElement, DataElement toDataElement, java.lang.String converType, boolean byReference, int append)
           
protected  void mapSingleTag(Context inputContext, Context outputContext, java.lang.String fromDataField, java.lang.String toDataField, boolean byReference, java.lang.String converType, int append)
          Process mapping according to desired parameters.
protected  void mapSingleTag(Context inputContext, Context outputContext, Tag element)
          Process mapping described in single tag descriptions.
static void preProcessForExpression(Tag outputFmtTag, KeyedCollection kc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FromExpression

public static final java.lang.String FromExpression
See Also:
Constant Field Values

myTag

Tag myTag

elements

Vector elements

resultMap

java.util.HashMap resultMap

Asterisk

public static final java.lang.String Asterisk
See Also:
Constant Field Values

APPEND_IGNORE

protected static final int APPEND_IGNORE
The ignore value for the append attribute.

See Also:
Constant Field Values

APPEND_TRUE

protected static final int APPEND_TRUE
The true value for the append attribute.

See Also:
Constant Field Values

APPEND_FALSE

protected static final int APPEND_FALSE
The false value for the append attribute.

See Also:
Constant Field Values

From

public static final java.lang.String From
The String from

See Also:
Constant Field Values

ConversioType

public static final java.lang.String ConversioType
The String convType

See Also:
Constant Field Values

ByReference

public static final java.lang.String ByReference
The String byReference

See Also:
Constant Field Values
Constructor Detail

RemoteDataMapper

public RemoteDataMapper(Tag tag,
                        Vector elements1)
Method Detail

mapContents

public void mapContents(Context inputContext,
                        Context outputContext)
                 throws DSEInvalidArgumentException,
                        DSEInvalidClassException,
                        DSEInvalidRequestException
Maps the contents of a context into another context.

Parameters:
inputContext - com.ibm.btt.base.Context
outputContext - com.ibm.btt.base.Context
Throws:
DSEInvalidArgumentException
DSEInvalidClassException
DSEInvalidRequestException

mapSingleTag

protected void mapSingleTag(Context inputContext,
                            Context outputContext,
                            Tag element)
                     throws DSEInvalidArgumentException,
                            DSEInvalidRequestException
Process mapping described in single tag descriptions. Such as <map from="fromField" to="toField"/>.

Parameters:
inputContext - input context
outputContext - output context
element - tag element read from XML snippet
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

mapSingleTag

protected void mapSingleTag(Context inputContext,
                            Context outputContext,
                            java.lang.String fromDataField,
                            java.lang.String toDataField,
                            boolean byReference,
                            java.lang.String converType,
                            int append)
                     throws DSEInvalidArgumentException,
                            DSEInvalidRequestException
Process mapping according to desired parameters.

Parameters:
inputContext - input context
outputContext - output context
fromDataField - from attribute value
toDataField - to attribute value
byReference - if mapping by reference
converType - convert type
append - append type
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

mapSingleElements

protected void mapSingleElements(DataElement fromDataElement,
                                 DataElement toDataElement,
                                 java.lang.String converType,
                                 boolean byReference,
                                 int append)
                          throws DSEInvalidArgumentException,
                                 DSEInvalidRequestException
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

deepMapSingleKeyedCollectionElements

protected void deepMapSingleKeyedCollectionElements(DataElement fromDataElement,
                                                    DataElement toDataElement,
                                                    java.lang.String converType,
                                                    boolean byReference,
                                                    int append)
                                             throws DSEInvalidArgumentException,
                                                    DSEInvalidRequestException
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

deepMapSingleIndexedCollectionElements

protected void deepMapSingleIndexedCollectionElements(DataElement fromDataElement,
                                                      DataElement toDataElement,
                                                      java.lang.String converType,
                                                      boolean byReference,
                                                      int append)
                                               throws DSEInvalidRequestException,
                                                      DSEInvalidArgumentException
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

mapSingleElement

protected void mapSingleElement(DataElement fromDataElement,
                                DataElement toDataElement,
                                java.lang.String converType,
                                boolean byReference,
                                int append)
                         throws DSEInvalidArgumentException,
                                DSEInvalidRequestException
Maps the contexts of one operation into the context of another operation.

Parameters:
inputOperation - com.ibm.btt.base.Operation
outputOperation - com.ibm.btt.base.Operation
Throws:
DSEInvalidArgumentException
DSEInvalidRequestException

getResultMap

public java.util.HashMap getResultMap()

mapContextToContext

protected void mapContextToContext(Context inputContext,
                                   Context outputContext,
                                   boolean byReference,
                                   java.lang.String converType,
                                   int append)
                            throws DSEInvalidRequestException,
                                   DSEInvalidArgumentException
The alternative for this algorithm is to create two dummy contexts.

Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

mapContextToKColl

protected void mapContextToKColl(Context inputContext,
                                 Context outputContext,
                                 java.lang.String toDataField,
                                 boolean byReference,
                                 java.lang.String converType,
                                 int append)
                          throws DSEInvalidRequestException,
                                 DSEInvalidArgumentException
Since the left (from) is a "*", it means the root keyed collection which is context.getKeyedCollection(). So creating a dummy context add the original keyed Collection as its child, then do the real mapping.

Throws:
DSEInvalidRequestException
DSEInvalidArgumentException

mapKCollToContext

protected void mapKCollToContext(Context inputContext,
                                 Context outputContext,
                                 java.lang.String fromDataField,
                                 boolean byReference,
                                 java.lang.String converType,
                                 int append)
                          throws DSEInvalidRequestException,
                                 DSEInvalidArgumentException
Throws:
DSEInvalidRequestException
DSEInvalidArgumentException
See Also:
mapContextToKColl

preProcessForExpression

public static void preProcessForExpression(Tag outputFmtTag,
                                           KeyedCollection kc)

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2011