Interface Variant

    • Method Detail

      • getParamList

        java.util.List<NameValuePair> getParamList()
        Gets the list of parameters handled by this variant.
        Returns:
        a List containing the parameters
      • setParameter

        java.lang.String setParameter​(HttpMessage msg,
                                      NameValuePair originalPair,
                                      java.lang.String param,
                                      java.lang.String value)
      • setEscapedParameter

        java.lang.String setEscapedParameter​(HttpMessage msg,
                                             NameValuePair originalPair,
                                             java.lang.String param,
                                             java.lang.String value)
      • setParameters

        default void setParameters​(HttpMessage message,
                                   java.util.List<InputVector> inputVectors)
        Sets the parameters into the given message.
        Parameters:
        message - the message that will be changed
        inputVectors - list of name of the parameter
        Since:
        2.11.0
      • getShortName

        default java.lang.String getShortName()
        Gets a short name of the Variant
        Returns:
        a String the short name of the variant
        Since:
        2.12.0
      • getLeafName

        default java.lang.String getLeafName​(java.lang.String nodeName,
                                             HttpMessage msg)
        Gets the name of the node to be used for the given msg in the Site Map. Returning null is taken to mean use the default name. This is currently the last element of the path (given in nodeName) followed by the url parameter names in brackets (if any) followed by the form parameter names in brackets (if any).
        Parameters:
        nodeName - the last element of the path
        msg - the message
      • getTreePath

        default java.util.List<java.lang.String> getTreePath​(HttpMessage msg)
                                                      throws org.apache.commons.httpclient.URIException
        Returns the tree path elements for the given message. Returning null is taken to mean use the default methods for obtaining tree path elements. This will determine the position of this message in the Site Map.

        By default the elements are returned for the following URL are:

        • http://example.org/path/to/element?aa=bb&cc==dd : ["path", "to", "element"]
        • http://example.org/path/to/element : ["path", "to", "element"]
        • http://example.org/path/to/ : ["path", "to"]
        • http://example.org/path/to : ["path", "to"]
        Parameters:
        msg -
        Returns:
        a List containing the tree path elements
        Throws:
        org.apache.commons.httpclient.URIException
      • decodeResponseBody

        default void decodeResponseBody​(HttpMessage msg)
        Decodes the response body of the given HttpMessage. for example, to change a binary payload to clear text to allow to do text/string comparisons of the content.
        Parameters:
        msg - the HTTP message whose response body will be decoded
        Since:
        2.15.0