public class GiftRegistryGenericAttributeNodeHandler extends java.lang.Object implements NodeHandler
BaseVO#get
and a generic setter BaseVO#set
. In an inbound message, if a tag
has attribute "type", then the tag represents a generic attribute. The specified type will
be the type of the attribute. For example, suppose there is a tag as follows:
<GiftRegistryVO> <NewData type="java.lang.String"> newValue </NewData> </GiftRegistryVO>Then, we know the <samp>NewData</samp> is a generic attribute in the GiftRegistryVO. Therefore, we can access it by calling get("NewData"), and we can also set it to its container by calling set("NewData", "newValue"). The generic attribute can be either an atomic type, or a type that supports default constructor.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_NAME
Name of the class
|
static java.lang.String |
COPYRIGHT
IBM copyright notice field.
|
Constructor and Description |
---|
GiftRegistryGenericAttributeNodeHandler() |
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 a generic attribute, and sets it to its parent object.
|
public static final java.lang.String COPYRIGHT
public static final java.lang.String CLASS_NAME
public GiftRegistryGenericAttributeNodeHandler()
public java.lang.Object handle(java.lang.Object parent, java.lang.Object currentNode, java.lang.Object[] params) throws java.lang.Exception
handle
in interface NodeHandler
parent
- the parent object that has the generic objectcurrentNode
- the XML node that represents a generic attributeparams
- always null for this handlerjava.lang.Exception