Interface Variant
-
- All Known Implementing Classes:
VariantAbstractQuery
,VariantAbstractRPCQuery
,VariantCookie
,VariantCustom
,VariantDdnPath
,VariantDirectWebRemotingQuery
,VariantFormQuery
,VariantGWTQuery
,VariantHeader
,VariantJSONQuery
,VariantMultipartFormParameters
,VariantODataFilterQuery
,VariantODataIdQuery
,VariantURLPath
,VariantURLQuery
,VariantUserDefined
,VariantXMLQuery
public interface Variant
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
decodeResponseBody(HttpMessage msg)
Decodes the response body of the givenHttpMessage
.default java.lang.String
getLeafName(java.lang.String nodeName, HttpMessage msg)
Gets the name of the node to be used for the givenmsg
in the Site Map.java.util.List<NameValuePair>
getParamList()
Gets the list of parameters handled by this variant.default java.lang.String
getShortName()
Gets a short name of the Variantdefault java.util.List<java.lang.String>
getTreePath(HttpMessage msg)
Returns the tree path elements for the givenmessage
.java.lang.String
setEscapedParameter(HttpMessage msg, NameValuePair originalPair, java.lang.String param, java.lang.String value)
void
setMessage(HttpMessage msg)
java.lang.String
setParameter(HttpMessage msg, NameValuePair originalPair, java.lang.String param, java.lang.String value)
default void
setParameters(HttpMessage message, java.util.List<InputVector> inputVectors)
Sets the parameters into the givenmessage
.
-
-
-
Method Detail
-
setMessage
void setMessage(HttpMessage msg)
-
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 givenmessage
.- Parameters:
message
- the message that will be changedinputVectors
- 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 givenmsg
in the Site Map. Returning null is taken to mean use the default name. This is currently the last element of the path (given innodeName
) 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 pathmsg
- 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 givenmessage
. 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 givenHttpMessage
. 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
-
-