Package org.apache.sling.engine
Class RequestUtil
- java.lang.Object
-
- org.apache.sling.engine.RequestUtil
-
@Deprecated public class RequestUtil extends java.lang.ObjectDeprecated.UseRequestUtil
-
-
Constructor Summary
Constructors Constructor Description RequestUtil()Deprecated.
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static java.lang.StringgetServletName(Servlet servlet)Deprecated.Utility method to return a name for the given servlet.static java.util.Map<java.lang.String,java.lang.Double>parserAcceptHeader(java.lang.String value)Deprecated.Parses anAccept-*header of the form:static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>>parserHeader(java.lang.String value)Deprecated.Parses a header of the form:static java.lang.ObjectsetRequestAttribute(HttpServletRequest request, java.lang.String name, java.lang.Object value)Deprecated.Sets the named request attribute to the new value and returns the previous value.
-
-
-
Method Detail
-
parserHeader
public static java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> parserHeader(java.lang.String value)
Deprecated.Parses a header of the form:Header = Token { "," Token } . Token = name { ";" Parameter } . Paramter = name [ "=" value ] ."," and ";" are not allowed within name and value- Parameters:
value- The header value to parse- Returns:
- A Map indexed by the Token names where the values are Map instances indexed by parameter name
-
parserAcceptHeader
public static java.util.Map<java.lang.String,java.lang.Double> parserAcceptHeader(java.lang.String value)
Deprecated.Parses anAccept-*header of the form:Header = Token { "," Token } . Token = name { ";" "q" [ "=" value ] } . Paramter = ."," and ";" are not allowed within name and value- Parameters:
value- The header value to parse- Returns:
- A Map indexed by the Token names where the values are
Doubleinstances providing the value of theqparameter.
-
getServletName
public static java.lang.String getServletName(Servlet servlet)
Deprecated.Utility method to return a name for the given servlet. This method applies the following algorithm to find a non-null, non-empty name:- If the servlet has a servlet config, the servlet name from the servlet config is taken.
- Otherwise check the servlet info
- Otherwise use the fully qualified name of the servlet class
- Parameters:
servlet- The servlet instance- Returns:
- The name of the servlet
-
setRequestAttribute
public static java.lang.Object setRequestAttribute(HttpServletRequest request, java.lang.String name, java.lang.Object value)
Deprecated.Sets the named request attribute to the new value and returns the previous value.- Parameters:
request- The request object whose attribute is to be set.name- The name of the attribute to be set.value- The new value of the attribute. If this isnullthe attribute is actually removed from the request.- Returns:
- The previous value of the named request attribute or
nullif it was not set.
-
-