com.ibm.commerce.programadapter.messagemapper
Interface MessageMapper

All Known Implementing Classes:
MessageMapperGenericImpl

public interface MessageMapper

MessageMapper will convert an object into a com.ibm.commerce.datatype.CommandProperty object. If the object cannot be converted, a null object is returned.


Field Summary
static java.lang.String COPYRIGHT
          IBM Copyright notice field.
static java.lang.String defaultCommandClassName
          The name of the default implementation of the interface.
static java.lang.String NAME
          The name of the interface.
 
Method Summary
  CommandProperty createFromMessage(java.lang.Object message)
          Convert the given object into a com.ibm.commerce.datatype.CommandProperty object.
 void destroy()
          Cleanup when the MessageMapper is not needed anymore.
 java.lang.Integer getMessageMapperId()
          Returns the MessageMapper identifier.
 java.lang.String getMessageMapperName()
          Returns the Message Mapper name.
 void init( TypedProperty configuration)
          Initializes the MessageMapper based on the given configuration.
 void setMessageMapperId(java.lang.Integer messageMapperId)
          Sets the Message Mapper Identifier.
 void setMessageMapperName(java.lang.String name)           Sets the Message Mapper name.
 

Field Detail
public static final java.lang.String COPYRIGHT
IBM Copyright notice field.
See Also:
Constant Field Values

NAME

public static final java.lang.String NAME
The name of the interface.
See Also:
Constant Field Values

defaultCommandClassName

public static final java.lang.String defaultCommandClassName
The name of the default implementation of the interface.
See Also:
Constant Field Values
Method Detail

createFromMessage

public CommandProperty createFromMessage(java.lang.Object message)
Convert the given object into a com.ibm.commerce.datatype.CommandProperty object.
Parameters:
message - the object to convert
Returns:
A command property representation of the given object. If the message mapper cannot convert the given object to a command property, then null should be returned.

destroy

public void destroy()
Cleanup when the MessageMapper is not needed anymore.

getMessageMapperId

public java.lang.Integer getMessageMapperId()
Returns the MessageMapper identifier.
Returns:
The message mapper identifier.

getMessageMapperName

public java.lang.String getMessageMapperName()
Returns the Message Mapper name.
Returns:
The name of the message mapper.

init

public void init(TypedProperty configuration)
Initializes the MessageMapper based on the given configuration.
Parameters:
configuration - the configuration for the message mapper.

setMessageMapperId

public void setMessageMapperId(java.lang.Integer messageMapperId)
Sets the Message Mapper Identifier.
Parameters:
messageMapperId - the message mapper identifier.

setMessageMapperName

public void setMessageMapperName(java.lang.String name)
Sets the Message Mapper name.
Parameters:
name - the message mapper name.