com.ibm.commerce.programadapter.messagemapper

Interface MessageMapper

  • All Known Implementing Classes:
    GiftRegistryMessageMapper, 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

      Fields 
      Modifier and Type Field and Description
      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.
    • Field Detail

      • COPYRIGHT

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

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

      • createFromMessage

        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

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

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

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

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

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

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