com.ibm.commerce.programadapter.messagemapper
Class MessageMapperGroup
java.lang.Object
|
+--com.ibm.commerce.programadapter.messagemapper.MessageMapperGroup
- All Implemented Interfaces:
- ComponentConfiguration
- public class MessageMapperGroup
- extends java.lang.Object
- implements ComponentConfiguration
The Component which all messages will go through to be converted into a
com.ibm.commerce.datatype.CommandProperty object. This is responsible for
initializing all defined MessageMappers and calling the appropriate MessagMapper
to convert the given object.
Method Summary |
void |
destroy()
This destroy method will be called when the request servlet is stopped or destroyed. |
void |
enable(boolean val)
This method is used to dynamically enable or disable a component. |
static CommandProperty |
getObjectForMessage(java.lang.Object message)
Will call each MessageMessage in order they were configured in the component properties
and return the first non null CommandProperty object. |
static CommandProperty |
getObjectForMessage(java.lang.Object message,
java.lang.Integer deviceFmtId)
Will return the result from the specified MessageMapper which was specified by the MessageMapper Id. |
static CommandProperty |
getObjectForMessage(java.lang.Object message,
java.lang.String name)
Will return the result from the specified MessageMapper which was specified by the MessageMapper name. |
void |
init(org.w3c.dom.Element node)
The initilization method for the component. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
_MESSAGE_MAPPER_ID
public static final java.lang.String _MESSAGE_MAPPER_ID
_MESSAGE_MAPPER_NAME
public static final java.lang.String _MESSAGE_MAPPER_NAME
messageMapperGroup
public static java.util.Vector messageMapperGroup
MessageMapperGroup
public MessageMapperGroup()
- MessageMapperGroup Constructor.
destroy
public void destroy()
- This destroy method will be called when the request servlet is stopped or destroyed.
Will call the destory method on each defined MessageMapper.
- Specified by:
destroy
in interface ComponentConfiguration
enable
public void enable(boolean val)
throws java.lang.Exception
- This method is used to dynamically enable or disable a component.
- Specified by:
enable
in interface ComponentConfiguration
- Parameters:
val
- boolean true - enable component, false - disable component
getObjectForMessage
public static CommandProperty getObjectForMessage(java.lang.Object message)
- Will call each MessageMessage in order they were configured in the component properties
and return the first non null CommandProperty object. If no message mapper can convert
the given object, then a null will be returned.
- Parameters:
message
- java.lang.Object- Returns:
- com.ibm.commerce.datatype.CommandProperty
getObjectForMessage
public static CommandProperty getObjectForMessage(java.lang.Object message,
java.lang.Integer deviceFmtId)
- Will return the result from the specified MessageMapper which was specified by the MessageMapper Id.
- Parameters:
message
- java.lang.Objectmessage
- java.lang.Integer- Returns:
- com.ibm.commerce.datatype.CommandProperty
getObjectForMessage
public static CommandProperty getObjectForMessage(java.lang.Object message,
java.lang.String name)
- Will return the result from the specified MessageMapper which was specified by the MessageMapper name.
- Parameters:
message
- java.lang.Objectmessage
- java.lang.String- Returns:
- com.ibm.commerce.datatype.CommandProperty
init
public void init(org.w3c.dom.Element node)
throws java.lang.Exception
- The initilization method for the component. This method will be called
during initializtion of the Request Servlet.
- Specified by:
init
in interface ComponentConfiguration
- Parameters:
node
- - a dom element node with the parameters for the component, null if
no property is present