com.ibm.commerce.foundation.server.util.oagis

Class SelectionCriteriaMapper

  • java.lang.Object
    • com.ibm.commerce.foundation.server.util.oagis.SelectionCriteriaMapper


  • public class SelectionCriteriaMapper
    extends java.lang.Object
    Extracts the query parameters, XPath key and access profile(s) from the OAGIS GET verb selection criteria expression.
    • Field Summary

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

      Constructors 
      Constructor and Description
      SelectionCriteriaMapper(java.util.List alExpressions)
      Initializes a new SelectionCriteriaMapper with the OAGIS verb selection criteria expressions.
      SelectionCriteriaMapper(java.lang.String astrXPath)
      Creates a new SelectionCriteriaMapper for a given XPath expression.
    • Field Detail

      • COPYRIGHT

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

      • SelectionCriteriaMapper

        public SelectionCriteriaMapper(java.util.List alExpressions)
        Initializes a new SelectionCriteriaMapper with the OAGIS verb selection criteria expressions.
        Parameters:
        alExpressions - - list of com.ibm.commerce.oagis9.datatypes.ExpressionType or com.ibm.commerce.oagis9.datatypes.ActionExpressionType objects.
      • SelectionCriteriaMapper

        public SelectionCriteriaMapper(java.lang.String astrXPath)
        Creates a new SelectionCriteriaMapper for a given XPath expression.
        Parameters:
        astrXPath - - XPath expression
    • Method Detail

      • getActionCode

        public final java.lang.String getActionCode()
        Returns the action code.
        Returns:
        the action code.
      • getAccessProfiles

        public final java.util.List getAccessProfiles()
        This method returns a list of all access profile strings contained in the selection criteria expression. Get expressions currently support only one access profile and this method will always return a list with a maximum size of 1.
        Returns:
        a list of access profile strings. This list will contain a null element if the selection criteria expression does not have an access profile.
      • getAccessProfile

        public final java.lang.String getAccessProfile()
        This method returns the access profile contained in the selection criteria expression. Get expressions currently support only one access profile and this method is similar to calling getAccessProfiles() and selecting the first entry in the list.
        Returns:
        access profile string or null if the selection criteria expression does not have an access profile.
      • getQueryParameters

        public final java.util.Map getQueryParameters()
        Deprecated. 
        This method returns the parameters extracted from the GET Verb selection criteria expression.
        Returns:
        A map consisting of each parameter name and a list of com.ibm.commerce.foundation.client.util.oagis.RelationalExpression values.
      • getXPathKey

        public final java.lang.String getXPathKey()
        Returns the XPath key for a given search criteria expression.
        Returns:
        XPath key
      • toString

        public java.lang.String toString()
        (non-Javadoc)
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • findNameValueExpressionByName

        public RelationalExpression findNameValueExpressionByName(java.lang.String astrName)
        Returns the name-value pair expression from the selection criteria expression given the expression name.
        Parameters:
        astrName - - name identifying the expression; names can have an integer indexed (e.g., 'a.1' and 'a.2' are the names for two relational expression expressions 'a<=1 and a>-10'
        Returns:
        the name-value pair expression represented by the RelationalExpression, or 'null' if no expression is found.
      • getXPath

        public final java.lang.String getXPath()
        Returns:
        Returns the XPath.
      • getXPathParameters

        public java.util.HashMap getXPathParameters()
        Returns:
        Returns a hashmap of xpath parameters: the key is the name of the parameter + '.
      • getControlParameters

        public java.util.HashMap getControlParameters()
        This method returns the additional control parameters that is found in the XPath expression. These parameters are specified in the curly braces preceding the expression.
        Returns:
        The additional control parameters. The key is the name of the parameter suffixed with '.0'; the value is of type List. The list contains RelationalExpression objects.
      • getXPathSearchParameters

        public SearchParameters getXPathSearchParameters()
        Returns the parameters of the search() function when specified in the first predicate of the XPath expression in the OAGIS GET verb selection criteria expression.
        Returns:
        SearchParameters object