com.ibm.commerce.giftregistry.messaging.programadapter.messagemapper

Class GiftRegistryPropertyTagHandler

  • java.lang.Object
    • com.ibm.commerce.giftregistry.messaging.programadapter.messagemapper.GiftRegistryPropertyTagHandler
  • All Implemented Interfaces:
    NodeHandler


    public class GiftRegistryPropertyTagHandler
    extends java.lang.Object
    implements NodeHandler
    A tag is property tag if and only if it represents a property of atomic type. By default, the value of a property tag is a text node in the XML. It should also be a leaf in DOM. For example, getFirstName() returns a String, which is an atomic type. Then, the tag <FirstName> is a property tag.
    • Field Summary

      Fields 
      Modifier and Type Field and Description
      static java.lang.String CLASS_NAME
      Classname
      static java.lang.String COPYRIGHT
      IBM copyright notice field.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.lang.Object handle(java.lang.Object parent, java.lang.Object currentNode, java.lang.Object[] params)
      Retrieves the value of the property represented by a node, and adds the result into the given parent object.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM copyright notice field.
        See Also:
        Constant Field Values
      • CLASS_NAME

        public static final java.lang.String CLASS_NAME
        Classname
    • Constructor Detail

      • GiftRegistryPropertyTagHandler

        public GiftRegistryPropertyTagHandler()
    • Method Detail

      • handle

        public java.lang.Object handle(java.lang.Object parent,
                                       java.lang.Object currentNode,
                                       java.lang.Object[] params)
                                throws java.lang.Exception
        Retrieves the value of the property represented by a node, and adds the result into the given parent object. Null value will not be added.
        Specified by:
        handle in interface NodeHandler
        Parameters:
        parent - the parent of the node to be processed. It has to be a collection.
        currentNode - the currentNode that is to be handled. It has to be a Element
        param - it contains any number of optional parameters that may be useful. By default, no parameter is needed.
        Returns:
        An object that represents the given currentNode's value, null if the given node contains null string as its text field.
        Throws:
        An - InvalidArgumentException will be thrown if the property value can not be retrieved, or the retrieved property value can not be added to parent
        java.lang.Exception - if the processing fails
        See Also:
        com.ibm.commerce.giftregistry.messaging.NodeHandler#handle(java.lang.Object, java.lang.Object, java.lang.Object[])