com.ibm.commerce.foundation.client.facade.bod.servlet.config

Class URLParameterToNounElementAssociation

  • java.lang.Object
    • com.ibm.commerce.foundation.client.facade.bod.servlet.config.URLParameterToNounElementAssociation


  • public class URLParameterToNounElementAssociation
    extends java.lang.Object
    This class represents the configuration between a particular element of a noun to a URL parameter. This configuration contains the information that is required to transform the URL parameter to noun element and the description attributes required for the transformation.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      java.util.Map getAssociatedUrlParameters()
      This method returns the map that contains the url parameters that are associated to this URL parameter.
      java.lang.String[] getNameAttribute()
      This method returns the name attribute where the user data name of the user data type is located.
      java.lang.String[] getNounElementTree()
      This method returns the tree of elements of the current association.
      java.lang.String getType()
      This method returns the declared type of the association.
      org.w3c.dom.NamedNodeMap getUrlParameterAttributes()
      This method returns a Map of the attributes associated with this URL parameter.
      java.lang.String getURLParameterName()
      This method returns the URL parameter name of the association.
      java.lang.String[] getValueAttribute()
      This method returns the value attribute where the user data value of the user data type is located.
      java.lang.String getXPath()
      This method returns the specified XPath of the noun defined in the association.
      boolean isEmptyValueAllowed()
      This method returns whether the the value is allowed to be empty when the URL parameter is mapped to the noun.
      boolean isKeyElement()
      This method returns whether the current property is considered one of the unique properties of the business object.
      boolean isModifiable()
      This method returns whether the current element is modifiable when building the Change business object document.
      boolean isNillable()
      This method returns whether the value is allowed to be null when the URL parameter is mapped to the noun.
      boolean isPreservingDataType()
      This method returns whether the value should be kept in its native data type form.
      boolean isReturnedElement()
      This method returns whether the current property should be returned when the transformation from noun to URL parameter is being performed.
      java.lang.String toString()
      This method returns the string representation of the object for debugging purposes.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Method Detail

      • toString

        public java.lang.String toString()
        This method returns the string representation of the object for debugging purposes.
        Overrides:
        toString in class java.lang.Object
        Returns:
        The String representation of the object.
      • isKeyElement

        public boolean isKeyElement()
        This method returns whether the current property is considered one of the unique properties of the business object.
        Returns:
        Whether the current properties is one of the unique properties of the business object.
      • isModifiable

        public boolean isModifiable()
        This method returns whether the current element is modifiable when building the Change business object document. If this element is populated and it is modifiable then the action expression will point to the changable containing noun part.
        Returns:
        Whether the current element is modifiable.
      • isReturnedElement

        public boolean isReturnedElement()
        This method returns whether the current property should be returned when the transformation from noun to URL parameter is being performed.
        Returns:
        Whether this parameter needs to be returned when the transformation between noun to the URL parameter.
      • isEmptyValueAllowed

        public boolean isEmptyValueAllowed()
        This method returns whether the the value is allowed to be empty when the URL parameter is mapped to the noun.
        Returns:
        Whether this parameter is allowed to be an empty value.
      • isNillable

        public boolean isNillable()
        This method returns whether the value is allowed to be null when the URL parameter is mapped to the noun.
        Returns:
        Whether this parameter is allowed to be null.
      • isPreservingDataType

        public boolean isPreservingDataType()
        This method returns whether the value should be kept in its native data type form. For example, whether booleans and numbers should be converted to strings.
        Returns:
        True if the data type of the value should be preserved, false if it should be converted to a string.
      • getNounElementTree

        public java.lang.String[] getNounElementTree()
        This method returns the tree of elements of the current association. This tree represents where in the noun the element can be found.
        Returns:
        The tree of elements that defines where in the noun the association is located.
      • getType

        public java.lang.String getType()
        This method returns the declared type of the association. Special association types, like "UserData", can have special transformation semantics.
        Returns:
        The defined type of the property of the business object pertaining to the transformation.
      • getURLParameterName

        public java.lang.String getURLParameterName()
        This method returns the URL parameter name of the association.
        Returns:
        The URL parameter name.
      • getXPath

        public java.lang.String getXPath()
        This method returns the specified XPath of the noun defined in the association.
        Returns:
        The XPath of the noun.
      • getNameAttribute

        public java.lang.String[] getNameAttribute()
        This method returns the name attribute where the user data name of the user data type is located.
        Returns:
        Where the name property should be populated. The default value is "name".
      • getValueAttribute

        public java.lang.String[] getValueAttribute()
        This method returns the value attribute where the user data value of the user data type is located.
        Returns:
        Where the value property should be populated. The default value is "value".
      • getAssociatedUrlParameters

        public java.util.Map getAssociatedUrlParameters()
        This method returns the map that contains the url parameters that are associated to this URL parameter. The associated parameter will be mapped to the specified location in the noun. For example, the following is specified in the clientobjects xml file
         <_config:URLParameter name="PROPERTY_" nounElement="/CampaignElement/CampaignElementVariable" type="UserData" >
            <_config:ParameterAssociation name="ASSOCIATEDPROPERTY_sequence_"   value="/SequenceOrder" />
          
         
        The request has the following parameters:
         PROPERTY_catalogEntryIdList=[10251, 10253, 10255]
         ASSOCIATEDPROPERTY_sequence_catalogEntryIdList=[1.0, 3.0, 2.0]
         
        For each PROPERTY_ parameter an associated parameter will be looked for in the request. The associated parameter will begin with the prefix specified in the ParameterAssociation name. If the associated parameter is found in the request, then the value of the parameter will be put in the noun in the location specified in the ParameterAssociation value. For the previous example, the noun will look like the following:
                <_mkt:CampaignElementVariable>
                  <_mkt:Name>catalogEntryIdList
                  <_mkt:Value>10251
                  <_mkt:SequenceOrder>1.0
                
                <_mkt:CampaignElementVariable>
                  <_mkt:Name>catalogEntryIdList
                  <_mkt:Value>10253
                  <_mkt:SequenceOrder>3.0
                
                <_mkt:CampaignElementVariable>
                  <_mkt:Name>catalogEntryIdList
                  <_mkt:Value>10255
                  <_mkt:SequenceOrder>2.0
                 
         
        Multiple ParameterAssociations can be specified for the same URLParameter.
        Returns:
        A map of url parameter strings and the value contains where the value should be populated. The key is the url parameter prefix (for example, ASSOCIATEDPROPERTY_sequence_). The prefix will be prepended to the user data name. The values are an array of string which is the path into the noun (for example [SequenceOrder] or [StoreIdentifier,StoreExternalIdentifier,Name])
      • getUrlParameterAttributes

        public org.w3c.dom.NamedNodeMap getUrlParameterAttributes()
        This method returns a Map of the attributes associated with this URL parameter.
        Returns:
        A NamedNodeMap of URLParameter attributes.