| java.lang.Object org.jivesoftware.util.ParamUtils
ParamUtils | public class ParamUtils (Code) | | Assists JSP writers in getting parameters and attributes.
|
Method Summary | |
public static String | getAttribute(HttpServletRequest request, String name) Returns an attribute as a string. | public static String | getAttribute(HttpServletRequest request, String name, boolean emptyStringsOK) Returns an attribute as a string.
Parameters: request - the HttpServletRequest object, known as "request" in a JSP page. Parameters: name - the name of the parameter you want to get. Parameters: emptyStringsOK - return the parameter values even if it is an empty string. | public static boolean | getBooleanAttribute(HttpServletRequest request, String name) Returns an attribute as a boolean.
Parameters: request - the HttpServletRequest object, known as "request" in a JSP page. Parameters: name - the name of the attribute you want to get. | public static boolean | getBooleanParameter(HttpServletRequest request, String name) Returns a parameter as a boolean. | public static boolean | getBooleanParameter(HttpServletRequest request, String name, boolean defaultVal) Returns a parameter as a boolean. | public static double | getDoubleParameter(HttpServletRequest request, String name, double defaultNum) Returns a parameter as a double. | public static int | getIntAttribute(HttpServletRequest request, String name, int defaultNum) Returns an attribute as a int.
Parameters: request - the HttpServletRequest object, known as "request" in a JSP page. Parameters: name - the name of the attribute you want to get. | public static int | getIntParameter(HttpServletRequest request, String name, int defaultNum) Returns a parameter as an int. | public static int[] | getIntParameters(HttpServletRequest request, String name, int defaultNum) Returns a list of int parameters. | public static long | getLongAttribute(HttpServletRequest request, String name, long defaultNum) Returns an attribute as a long.
Parameters: request - the HttpServletRequest object, known as "request" in a JSP page. Parameters: name - the name of the attribute you want to get. | public static long | getLongParameter(HttpServletRequest request, String name, long defaultNum) Returns a parameter as a long. | public static long[] | getLongParameters(HttpServletRequest request, String name, long defaultNum) Returns a list of long parameters. | public static String | getParameter(HttpServletRequest request, String name) Returns a parameter as a string. | public static String | getParameter(HttpServletRequest request, String name, boolean emptyStringsOK) Returns a parameter as a string.
Parameters: request - the HttpServletRequest object, known as "request" in aJSP page. Parameters: name - the name of the parameter you want to get Parameters: emptyStringsOK - return the parameter values even if it is an empty string. | public static String[] | getParameters(HttpServletRequest request, String name) Returns a list of parameters of the same name
Parameters: request - an HttpServletRequest object. |
getAttribute | public static String getAttribute(HttpServletRequest request, String name)(Code) | | Returns an attribute as a string.
Parameters: request - the HttpServletRequest object, known as "request" in a JSP page. Parameters: name - the name of the parameter you want to get the value of the parameter or null if the parameter was notfound or if the parameter is a zero-length string. |
getAttribute | public static String getAttribute(HttpServletRequest request, String name, boolean emptyStringsOK)(Code) | | Returns an attribute as a string.
Parameters: request - the HttpServletRequest object, known as "request" in a JSP page. Parameters: name - the name of the parameter you want to get. Parameters: emptyStringsOK - return the parameter values even if it is an empty string. the value of the parameter or null if the parameter was notfound. |
getBooleanAttribute | public static boolean getBooleanAttribute(HttpServletRequest request, String name)(Code) | | Returns an attribute as a boolean.
Parameters: request - the HttpServletRequest object, known as "request" in a JSP page. Parameters: name - the name of the attribute you want to get. true if the value of the attribute is "true", false otherwise. |
getBooleanParameter | public static boolean getBooleanParameter(HttpServletRequest request, String name)(Code) | | Returns a parameter as a boolean.
Parameters: request - the HttpServletRequest object, known as "request" in aJSP page. Parameters: name - the name of the parameter you want to get true if the value of the parameter was "true", false otherwise. |
getBooleanParameter | public static boolean getBooleanParameter(HttpServletRequest request, String name, boolean defaultVal)(Code) | | Returns a parameter as a boolean.
Parameters: request - the HttpServletRequest object, known as "request" in aJSP page. Parameters: name - the name of the parameter you want to get true if the value of the parameter was "true", false otherwise. |
getDoubleParameter | public static double getDoubleParameter(HttpServletRequest request, String name, double defaultNum)(Code) | | Returns a parameter as a double.
Parameters: request - the HttpServletRequest object, known as "request" in aJSP page. Parameters: name - the name of the parameter you want to get the double value of the parameter specified or the default valueif the parameter is not found. |
getIntAttribute | public static int getIntAttribute(HttpServletRequest request, String name, int defaultNum)(Code) | | Returns an attribute as a int.
Parameters: request - the HttpServletRequest object, known as "request" in a JSP page. Parameters: name - the name of the attribute you want to get. the int value of the attribute or the default value if theattribute is not found or is a zero length string. |
getIntParameter | public static int getIntParameter(HttpServletRequest request, String name, int defaultNum)(Code) | | Returns a parameter as an int.
Parameters: request - the HttpServletRequest object, known as "request" in aJSP page. Parameters: name - the name of the parameter you want to get the int value of the parameter specified or the default value ifthe parameter is not found. |
getIntParameters | public static int[] getIntParameters(HttpServletRequest request, String name, int defaultNum)(Code) | | Returns a list of int parameters.
Parameters: request - the HttpServletRequest object, known as "request" in aJSP page. Parameters: name - the name of the parameter you want to get Parameters: defaultNum - the default value of a parameter, if the parametercan't be converted into an int. |
getLongAttribute | public static long getLongAttribute(HttpServletRequest request, String name, long defaultNum)(Code) | | Returns an attribute as a long.
Parameters: request - the HttpServletRequest object, known as "request" in a JSP page. Parameters: name - the name of the attribute you want to get. the long value of the attribute or the default value if theattribute is not found or is a zero length string. |
getLongParameter | public static long getLongParameter(HttpServletRequest request, String name, long defaultNum)(Code) | | Returns a parameter as a long.
Parameters: request - the HttpServletRequest object, known as "request" in aJSP page. Parameters: name - the name of the parameter you want to get the long value of the parameter specified or the default value ifthe parameter is not found. |
getLongParameters | public static long[] getLongParameters(HttpServletRequest request, String name, long defaultNum)(Code) | | Returns a list of long parameters.
Parameters: request - the HttpServletRequest object, known as "request" in aJSP page. Parameters: name - the name of the parameter you want to get Parameters: defaultNum - the default value of a parameter, if the parametercan't be converted into a long. |
getParameter | public static String getParameter(HttpServletRequest request, String name)(Code) | | Returns a parameter as a string.
Parameters: request - the HttpServletRequest object, known as "request" in aJSP page. Parameters: name - the name of the parameter you want to get the value of the parameter or null if the parameter was notfound or if the parameter is a zero-length string. |
getParameter | public static String getParameter(HttpServletRequest request, String name, boolean emptyStringsOK)(Code) | | Returns a parameter as a string.
Parameters: request - the HttpServletRequest object, known as "request" in aJSP page. Parameters: name - the name of the parameter you want to get Parameters: emptyStringsOK - return the parameter values even if it is an empty string. the value of the parameter or null if the parameter was notfound. |
getParameters | public static String[] getParameters(HttpServletRequest request, String name)(Code) | | Returns a list of parameters of the same name
Parameters: request - an HttpServletRequest object. an array of non-null, non-blank strings of the same name. Thismethod will return an empty array if no parameters were found. |
|
|