Liferay 7.0-ga1 portal-kernel

com.liferay.portal.kernel.util
Class ParamUtil

java.lang.Object
  extended by com.liferay.portal.kernel.util.ParamUtil

public class ParamUtil
extends Object

Provides utility methods for reading request parameters.


Constructor Summary
ParamUtil()
           
 
Method Summary
static boolean get(javax.servlet.http.HttpServletRequest request, String param, boolean defaultValue)
          Returns the request parameter value as a boolean.
static Date get(javax.servlet.http.HttpServletRequest request, String param, DateFormat dateFormat, Date defaultValue)
          Returns the request parameter value as a Date.
static double get(javax.servlet.http.HttpServletRequest request, String param, double defaultValue)
          Returns the request parameter value as a double.
static float get(javax.servlet.http.HttpServletRequest request, String param, float defaultValue)
          Returns the request parameter value as a float.
static int get(javax.servlet.http.HttpServletRequest request, String param, int defaultValue)
          Returns the request parameter value as an integer.
static long get(javax.servlet.http.HttpServletRequest request, String param, long defaultValue)
          Returns the request parameter value as a long.
static Number get(javax.servlet.http.HttpServletRequest request, String param, Number defaultValue)
          Returns the request parameter value as a Number.
static short get(javax.servlet.http.HttpServletRequest request, String param, short defaultValue)
          Returns the request parameter value as a short.
static String get(javax.servlet.http.HttpServletRequest request, String param, String defaultValue)
          Returns the request parameter value as a String.
static boolean get(PortletRequest portletRequest, String param, boolean defaultValue)
          Returns the portlet request parameter value as a boolean.
static Date get(PortletRequest portletRequest, String param, DateFormat dateFormat, Date defaultValue)
          Returns the portlet request parameter value as a Date.
static double get(PortletRequest portletRequest, String param, double defaultValue)
          Returns the portlet request parameter value as a double.
static float get(PortletRequest portletRequest, String param, float defaultValue)
          Returns the portlet request parameter value as a float.
static int get(PortletRequest portletRequest, String param, int defaultValue)
          Returns the portlet request parameter value as an integer.
static long get(PortletRequest portletRequest, String param, long defaultValue)
          Returns the portlet request parameter value as a long.
static Number get(PortletRequest portletRequest, String param, Number defaultValue)
          Returns the portlet request parameter value as a Number.
static short get(PortletRequest portletRequest, String param, short defaultValue)
          Returns the portlet request parameter value as a short.
static String get(PortletRequest portletRequest, String param, String defaultValue)
          Returns the portlet request parameter value as a String.
static boolean get(ServiceContext serviceContext, String param, boolean defaultValue)
          Returns the service context parameter value as a boolean.
static Date get(ServiceContext serviceContext, String param, DateFormat dateFormat, Date defaultValue)
          Returns the service context parameter value as a Date.
static double get(ServiceContext serviceContext, String param, double defaultValue)
          Returns the service context parameter value as a double.
static float get(ServiceContext serviceContext, String param, float defaultValue)
          Returns the service context parameter value as a float.
static int get(ServiceContext serviceContext, String param, int defaultValue)
          Returns the service context parameter value as an integer.
static long get(ServiceContext serviceContext, String param, long defaultValue)
          Returns the service context parameter value as a long.
static Number get(ServiceContext serviceContext, String param, Number defaultValue)
          Returns the service context parameter value as a Number.
static short get(ServiceContext serviceContext, String param, short defaultValue)
          Returns the service context parameter value as a short.
static String get(ServiceContext serviceContext, String param, String defaultValue)
          Returns the service context parameter value as a String.
static boolean getBoolean(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a boolean.
static boolean getBoolean(javax.servlet.http.HttpServletRequest request, String param, boolean defaultValue)
          Returns the request parameter value as a boolean.
static boolean getBoolean(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a boolean.
static boolean getBoolean(PortletRequest portletRequest, String param, boolean defaultValue)
          Returns the portlet request parameter value as a boolean.
static boolean getBoolean(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a boolean.
static boolean getBoolean(ServiceContext serviceContext, String param, boolean defaultValue)
          Returns the service context parameter value as a boolean.
static boolean[] getBooleanValues(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a boolean array.
static boolean[] getBooleanValues(javax.servlet.http.HttpServletRequest request, String param, boolean[] defaultValue)
          Returns the request parameter value as a boolean array.
static boolean[] getBooleanValues(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a boolean array.
static boolean[] getBooleanValues(PortletRequest portletRequest, String param, boolean[] defaultValue)
          Returns the portlet request parameter value as a boolean array.
static boolean[] getBooleanValues(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a boolean array.
static boolean[] getBooleanValues(ServiceContext serviceContext, String param, boolean[] defaultValue)
          Returns the service context parameter value as a boolean array.
static Date getDate(javax.servlet.http.HttpServletRequest request, String param, DateFormat dateFormat)
          Returns the request parameter value as a Date.
static Date getDate(javax.servlet.http.HttpServletRequest request, String param, DateFormat dateFormat, Date defaultValue)
          Returns the request parameter value as a Date.
static Date getDate(PortletRequest portletRequest, String param, DateFormat dateFormat)
          Returns the portlet request parameter value as a Date.
static Date getDate(PortletRequest portletRequest, String param, DateFormat dateFormat, Date defaultValue)
          Returns the portlet request parameter value as a Date.
static Date getDate(ServiceContext serviceContext, String param, DateFormat dateFormat)
          Returns the service context parameter value as a Date.
static Date getDate(ServiceContext serviceContext, String param, DateFormat dateFormat, Date defaultValue)
          Returns the service context parameter value as a Date.
static Date[] getDateValues(javax.servlet.http.HttpServletRequest request, String param, DateFormat dateFormat)
          Returns the request parameter value as a Date array.
static Date[] getDateValues(javax.servlet.http.HttpServletRequest request, String param, DateFormat dateFormat, Date[] defaultValue)
          Returns the request parameter value as a Date array.
static Date[] getDateValues(PortletRequest portletRequest, String param, DateFormat dateFormat)
          Returns the portlet request parameter value as a Date array.
static Date[] getDateValues(PortletRequest portletRequest, String param, DateFormat dateFormat, Date[] defaultValue)
          Returns the portlet request parameter value as a Date array.
static Date[] getDateValues(ServiceContext serviceContext, String param, DateFormat dateFormat)
          Returns the service context parameter value as a Date array.
static Date[] getDateValues(ServiceContext serviceContext, String param, DateFormat dateFormat, Date[] defaultValue)
          Returns the service context parameter value as a Date array.
static double getDouble(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a double.
static double getDouble(javax.servlet.http.HttpServletRequest request, String param, double defaultValue)
          Returns the request parameter value as a double.
static double getDouble(javax.servlet.http.HttpServletRequest request, String param, double defaultValue, Locale locale)
          Returns the request parameter value as a double.
static double getDouble(javax.servlet.http.HttpServletRequest request, String param, Locale locale)
          Returns the request parameter value as a double.
static double getDouble(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a double.
static double getDouble(PortletRequest portletRequest, String param, double defaultValue)
          Returns the portlet request parameter value as a double.
static double getDouble(PortletRequest portletRequest, String param, double defaultValue, Locale locale)
          Returns the portlet request parameter value as a double.
static double getDouble(PortletRequest portletRequest, String param, Locale locale)
          Returns the portlet request parameter value as a double.
static double getDouble(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a double.
static double getDouble(ServiceContext serviceContext, String param, double defaultValue)
          Returns the service context parameter value as a double.
static double[] getDoubleValues(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a double array.
static double[] getDoubleValues(javax.servlet.http.HttpServletRequest request, String param, double[] defaultValue)
          Returns the request parameter value as a double array.
static double[] getDoubleValues(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a double array.
static double[] getDoubleValues(PortletRequest portletRequest, String param, double[] defaultValue)
          Returns the portlet request parameter value as a double array.
static double[] getDoubleValues(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a double array.
static double[] getDoubleValues(ServiceContext serviceContext, String param, double[] defaultValue)
          Returns the service context parameter value as a double array.
static float getFloat(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a float.
static float getFloat(javax.servlet.http.HttpServletRequest request, String param, float defaultValue)
          Returns the request parameter value as a float.
static float getFloat(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a float.
static float getFloat(PortletRequest portletRequest, String param, float defaultValue)
          Returns the portlet request parameter value as a float.
static float getFloat(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a float.
static float getFloat(ServiceContext serviceContext, String param, float defaultValue)
          Returns the service context parameter value as a float.
static float[] getFloatValues(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a float array.
static float[] getFloatValues(javax.servlet.http.HttpServletRequest request, String param, float[] defaultValue)
          Returns the request parameter value as a float array.
static float[] getFloatValues(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a float array.
static float[] getFloatValues(PortletRequest portletRequest, String param, float[] defaultValue)
          Returns the portlet request parameter value as a float array.
static float[] getFloatValues(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a float array.
static float[] getFloatValues(ServiceContext serviceContext, String param, float[] defaultValue)
          Returns the service context parameter value as a float array.
static int getInteger(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as an integer.
static int getInteger(javax.servlet.http.HttpServletRequest request, String param, int defaultValue)
          Returns the request parameter value as an integer.
static int getInteger(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as an integer.
static int getInteger(PortletRequest portletRequest, String param, int defaultValue)
          Returns the portlet request parameter value as an integer.
static int getInteger(ServiceContext serviceContext, String param)
          Returns the service context parameter value as an integer.
static int getInteger(ServiceContext serviceContext, String param, int defaultValue)
          Returns the service context parameter value as an integer.
static int[] getIntegerValues(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as an integer array.
static int[] getIntegerValues(javax.servlet.http.HttpServletRequest request, String param, int[] defaultValue)
          Returns the request parameter value as an integer array.
static int[] getIntegerValues(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as an integer array.
static int[] getIntegerValues(PortletRequest portletRequest, String param, int[] defaultValue)
          Returns the portlet request parameter value as an integer array.
static int[] getIntegerValues(ServiceContext serviceContext, String param)
          Returns the service context parameter value as an integer array.
static int[] getIntegerValues(ServiceContext serviceContext, String param, int[] defaultValue)
          Returns the service context parameter value as an integer array.
static long getLong(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a long.
static long getLong(javax.servlet.http.HttpServletRequest request, String param, long defaultValue)
          Returns the request parameter value as a long.
static long getLong(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a long.
static long getLong(PortletRequest portletRequest, String param, long defaultValue)
          Returns the portlet request parameter value as a long.
static long getLong(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a long.
static long getLong(ServiceContext serviceContext, String param, long defaultValue)
          Returns the service context parameter value as a long.
static long[] getLongValues(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a long array.
static long[] getLongValues(javax.servlet.http.HttpServletRequest request, String param, long[] defaultValue)
          Returns the request parameter value as a long array.
static long[] getLongValues(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a long array.
static long[] getLongValues(PortletRequest portletRequest, String param, long[] defaultValue)
          Returns the portlet request parameter value as a long array.
static long[] getLongValues(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a long array.
static long[] getLongValues(ServiceContext serviceContext, String param, long[] defaultValue)
          Returns the service context parameter value as a long array.
static Number getNumber(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a Number.
static Number getNumber(javax.servlet.http.HttpServletRequest request, String param, Number defaultValue)
          Returns the request parameter value as a Number.
static Number getNumber(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a Number.
static Number getNumber(PortletRequest portletRequest, String param, Number defaultValue)
          Returns the portlet request parameter value as a Number.
static Number getNumber(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a Number.
static Number getNumber(ServiceContext serviceContext, String param, Number defaultValue)
          Returns the service context parameter value as a Number.
static Number[] getNumberValues(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a Number array.
static Number[] getNumberValues(javax.servlet.http.HttpServletRequest request, String param, Number[] defaultValue)
          Returns the request parameter value as a Number array.
static Number[] getNumberValues(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a Number array.
static Number[] getNumberValues(PortletRequest portletRequest, String param, Number[] defaultValue)
          Returns the portlet request parameter value as a Number array.
static Number[] getNumberValues(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a Number array.
static Number[] getNumberValues(ServiceContext serviceContext, String param, Number[] defaultValue)
          Returns the service context parameter value as a Number array.
static String[] getParameterValues(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a String array.
static String[] getParameterValues(javax.servlet.http.HttpServletRequest request, String param, String[] defaultValue)
          Returns the request parameter value as a String array.
static String[] getParameterValues(javax.servlet.http.HttpServletRequest request, String param, String[] defaultValue, boolean split)
          Returns the request parameter value as a String array.
static String[] getParameterValues(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a String array.
static String[] getParameterValues(PortletRequest portletRequest, String param, String[] defaultValue)
          Returns the portlet request parameter value as a String array.
static String[] getParameterValues(PortletRequest portletRequest, String param, String[] defaultValue, boolean split)
          Returns the portlet request parameter value as a String array.
static short getShort(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a short.
static short getShort(javax.servlet.http.HttpServletRequest request, String param, short defaultValue)
          Returns the request parameter value as a short.
static short getShort(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a short.
static short getShort(PortletRequest portletRequest, String param, short defaultValue)
          Returns the portlet request parameter value as a short.
static short getShort(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a short.
static short getShort(ServiceContext serviceContext, String param, short defaultValue)
          Returns the service context parameter value as a short.
static short[] getShortValues(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a short array.
static short[] getShortValues(javax.servlet.http.HttpServletRequest request, String param, short[] defaultValue)
          Returns the request parameter value as a short array.
static short[] getShortValues(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a short array.
static short[] getShortValues(PortletRequest portletRequest, String param, short[] defaultValue)
          Returns the portlet request parameter value as a short array.
static short[] getShortValues(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a short array.
static short[] getShortValues(ServiceContext serviceContext, String param, short[] defaultValue)
          Returns the service context parameter value as a short array.
static String getString(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a String.
static String getString(javax.servlet.http.HttpServletRequest request, String param, String defaultValue)
          Returns the request parameter value as a String.
static String getString(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a String.
static String getString(PortletRequest portletRequest, String param, String defaultValue)
          Returns the portlet request parameter value as a String.
static String getString(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a String.
static String getString(ServiceContext serviceContext, String param, String defaultValue)
          Returns the service context parameter value as a String.
static String[] getStringValues(javax.servlet.http.HttpServletRequest request, String param)
          Returns the request parameter value as a String array.
static String[] getStringValues(javax.servlet.http.HttpServletRequest request, String param, String[] defaultValue)
          Returns the request parameter value as a String array.
static String[] getStringValues(PortletRequest portletRequest, String param)
          Returns the portlet request parameter value as a String array.
static String[] getStringValues(PortletRequest portletRequest, String param, String[] defaultValue)
          Returns the portlet request parameter value as a String array.
static String[] getStringValues(ServiceContext serviceContext, String param)
          Returns the service context parameter value as a String array.
static String[] getStringValues(ServiceContext serviceContext, String param, String[] defaultValue)
          Returns the service context parameter value as a String array.
static void print(javax.servlet.http.HttpServletRequest request)
          Prints all the request parameters as standard output.
static void print(PortletRequest portletRequest)
          Prints all the portlet request parameters as standard output.
static void print(ServiceContext serviceContext)
          Prints all the service context parameters as standard output.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParamUtil

public ParamUtil()
Method Detail

get

public static boolean get(javax.servlet.http.HttpServletRequest request,
                          String param,
                          boolean defaultValue)
Returns the request parameter value as a boolean. If the parameter is missing, the default value is returned.

If the value is not convertible to a boolean, false is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a boolean

get

public static Date get(javax.servlet.http.HttpServletRequest request,
                       String param,
                       DateFormat dateFormat,
                       Date defaultValue)
Returns the request parameter value as a Date. If the parameter is missing or not convertible to a Date, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse date
defaultValue - a default value
Returns:
the request parameter value as a Date

get

public static double get(javax.servlet.http.HttpServletRequest request,
                         String param,
                         double defaultValue)
Returns the request parameter value as a double. If the parameter is missing or not convertible to a double, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a double

get

public static float get(javax.servlet.http.HttpServletRequest request,
                        String param,
                        float defaultValue)
Returns the request parameter value as a float. If the parameter is missing or not convertible to a float, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a float

get

public static int get(javax.servlet.http.HttpServletRequest request,
                      String param,
                      int defaultValue)
Returns the request parameter value as an integer. If the parameter is missing or not convertible to an integer, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as an integer

get

public static long get(javax.servlet.http.HttpServletRequest request,
                       String param,
                       long defaultValue)
Returns the request parameter value as a long. If the parameter is missing or not convertible to a long, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a long

get

public static Number get(javax.servlet.http.HttpServletRequest request,
                         String param,
                         Number defaultValue)
Returns the request parameter value as a Number. If the parameter is missing or not convertible to a Number, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a Number

get

public static short get(javax.servlet.http.HttpServletRequest request,
                        String param,
                        short defaultValue)
Returns the request parameter value as a short. If the parameter is missing or not convertible to a short, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a short

get

public static String get(javax.servlet.http.HttpServletRequest request,
                         String param,
                         String defaultValue)
Returns the request parameter value as a String. If the parameter is missing or not convertible to a String, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a String

get

public static boolean get(PortletRequest portletRequest,
                          String param,
                          boolean defaultValue)
Returns the portlet request parameter value as a boolean. If the parameter is missing, the default value is returned.

If the value is not convertible to a boolean, false is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a boolean

get

public static Date get(PortletRequest portletRequest,
                       String param,
                       DateFormat dateFormat,
                       Date defaultValue)
Returns the portlet request parameter value as a Date. If the parameter is missing or not convertible to a Date, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse date
defaultValue - a default value
Returns:
the portlet request parameter value as a Date

get

public static double get(PortletRequest portletRequest,
                         String param,
                         double defaultValue)
Returns the portlet request parameter value as a double. If the parameter is missing or not convertible to a double, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a double

get

public static float get(PortletRequest portletRequest,
                        String param,
                        float defaultValue)
Returns the portlet request parameter value as a float. If the parameter is missing or not convertible to a float, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a float

get

public static int get(PortletRequest portletRequest,
                      String param,
                      int defaultValue)
Returns the portlet request parameter value as an integer. If the parameter is missing or not convertible to an integer, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as an integer

get

public static long get(PortletRequest portletRequest,
                       String param,
                       long defaultValue)
Returns the portlet request parameter value as a long. If the parameter is missing or not convertible to a long, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a long

get

public static Number get(PortletRequest portletRequest,
                         String param,
                         Number defaultValue)
Returns the portlet request parameter value as a Number. If the parameter is missing or not convertible to a Number, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a Number

get

public static short get(PortletRequest portletRequest,
                        String param,
                        short defaultValue)
Returns the portlet request parameter value as a short. If the parameter is missing or not convertible to a short, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a short

get

public static String get(PortletRequest portletRequest,
                         String param,
                         String defaultValue)
Returns the portlet request parameter value as a String. If the parameter is missing or not convertible to a String, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a String

get

public static boolean get(ServiceContext serviceContext,
                          String param,
                          boolean defaultValue)
Returns the service context parameter value as a boolean. If the parameter is missing, the default value is returned.

If the value is not convertible to a boolean, false is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a boolean

get

public static Date get(ServiceContext serviceContext,
                       String param,
                       DateFormat dateFormat,
                       Date defaultValue)
Returns the service context parameter value as a Date. If the parameter is missing or not convertible to a Date, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse date
defaultValue - a default value
Returns:
the service context parameter value as a Date

get

public static double get(ServiceContext serviceContext,
                         String param,
                         double defaultValue)
Returns the service context parameter value as a double. If the parameter is missing or not convertible to a double, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a double

get

public static float get(ServiceContext serviceContext,
                        String param,
                        float defaultValue)
Returns the service context parameter value as a float. If the parameter is missing or not convertible to a float, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a float

get

public static int get(ServiceContext serviceContext,
                      String param,
                      int defaultValue)
Returns the service context parameter value as an integer. If the parameter is missing or not convertible to an integer, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as an integer

get

public static long get(ServiceContext serviceContext,
                       String param,
                       long defaultValue)
Returns the service context parameter value as a long. If the parameter is missing or not convertible to a long, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a long

get

public static Number get(ServiceContext serviceContext,
                         String param,
                         Number defaultValue)
Returns the service context parameter value as a Number. If the parameter is missing or not convertible to a Number, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a Number

get

public static short get(ServiceContext serviceContext,
                        String param,
                        short defaultValue)
Returns the service context parameter value as a short. If the parameter is missing or not convertible to a short, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a short

get

public static String get(ServiceContext serviceContext,
                         String param,
                         String defaultValue)
Returns the service context parameter value as a String. If the parameter is missing or not convertible to a String, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a String

getBoolean

public static boolean getBoolean(javax.servlet.http.HttpServletRequest request,
                                 String param)
Returns the request parameter value as a boolean. If the parameter is missing or not convertible to a boolean, false is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a boolean

getBoolean

public static boolean getBoolean(javax.servlet.http.HttpServletRequest request,
                                 String param,
                                 boolean defaultValue)
Returns the request parameter value as a boolean. If the parameter is missing, the default value is returned.

If the value is not convertible to a boolean, false is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a boolean

getBoolean

public static boolean getBoolean(PortletRequest portletRequest,
                                 String param)
Returns the portlet request parameter value as a boolean. If the parameter is missing or not convertible to a boolean, false is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a boolean

getBoolean

public static boolean getBoolean(PortletRequest portletRequest,
                                 String param,
                                 boolean defaultValue)
Returns the portlet request parameter value as a boolean. If the parameter is missing, the default value is returned.

If the value is not convertible to a boolean, false is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a boolean

getBoolean

public static boolean getBoolean(ServiceContext serviceContext,
                                 String param)
Returns the service context parameter value as a boolean. If the parameter is missing or not convertible to a boolean, false is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a boolean

getBoolean

public static boolean getBoolean(ServiceContext serviceContext,
                                 String param,
                                 boolean defaultValue)
Returns the service context parameter value as a boolean. If the parameter is missing, the default value is returned.

If the value is not convertible to a boolean, false is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a boolean

getBooleanValues

public static boolean[] getBooleanValues(javax.servlet.http.HttpServletRequest request,
                                         String param)
Returns the request parameter value as a boolean array. In the returned array, each parameter value not convertible to a boolean is replaced by false.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a boolean array

getBooleanValues

public static boolean[] getBooleanValues(javax.servlet.http.HttpServletRequest request,
                                         String param,
                                         boolean[] defaultValue)
Returns the request parameter value as a boolean array. In the returned array, each parameter value not convertible to a boolean is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a boolean array

getBooleanValues

public static boolean[] getBooleanValues(PortletRequest portletRequest,
                                         String param)
Returns the portlet request parameter value as a boolean array. In the returned array, each parameter value not convertible to a boolean is replaced by false.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a boolean array

getBooleanValues

public static boolean[] getBooleanValues(PortletRequest portletRequest,
                                         String param,
                                         boolean[] defaultValue)
Returns the portlet request parameter value as a boolean array. In the returned array, each parameter value not convertible to a boolean is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a boolean array

getBooleanValues

public static boolean[] getBooleanValues(ServiceContext serviceContext,
                                         String param)
Returns the service context parameter value as a boolean array. In the returned array, each parameter value not convertible to a boolean is replaced by false.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a boolean array

getBooleanValues

public static boolean[] getBooleanValues(ServiceContext serviceContext,
                                         String param,
                                         boolean[] defaultValue)
Returns the service context parameter value as a boolean array. In the returned array, each parameter value not convertible to a boolean is replaced by the default value.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a boolean array

getDate

public static Date getDate(javax.servlet.http.HttpServletRequest request,
                           String param,
                           DateFormat dateFormat)
Returns the request parameter value as a Date. If the parameter is missing or not convertible to a Date, the current date is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
Returns:
the request parameter value as a Date

getDate

public static Date getDate(javax.servlet.http.HttpServletRequest request,
                           String param,
                           DateFormat dateFormat,
                           Date defaultValue)
Returns the request parameter value as a Date. If the parameter is missing or not convertible to a Date, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
defaultValue - a default value
Returns:
the request parameter value as a Date

getDate

public static Date getDate(PortletRequest portletRequest,
                           String param,
                           DateFormat dateFormat)
Returns the portlet request parameter value as a Date. If the parameter is missing or not convertible to a Date, the current date is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
Returns:
the portlet request parameter value as a Date

getDate

public static Date getDate(PortletRequest portletRequest,
                           String param,
                           DateFormat dateFormat,
                           Date defaultValue)
Returns the portlet request parameter value as a Date. If the parameter is missing or not convertible to a Date, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
defaultValue - a default value
Returns:
the portlet request parameter value as a Date

getDate

public static Date getDate(ServiceContext serviceContext,
                           String param,
                           DateFormat dateFormat)
Returns the service context parameter value as a Date. If the parameter is missing or not convertible to a Date, the current date is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
Returns:
the service context parameter value as a Date

getDate

public static Date getDate(ServiceContext serviceContext,
                           String param,
                           DateFormat dateFormat,
                           Date defaultValue)
Returns the service context parameter value as a Date. If the parameter is missing or not convertible to a Date, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
defaultValue - a default value
Returns:
the service context parameter value as a Date

getDateValues

public static Date[] getDateValues(javax.servlet.http.HttpServletRequest request,
                                   String param,
                                   DateFormat dateFormat)
Returns the request parameter value as a Date array. In the returned array, each parameter value not convertible to a Date is replaced by the current date.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
Returns:
the request parameter value as a Date array

getDateValues

public static Date[] getDateValues(javax.servlet.http.HttpServletRequest request,
                                   String param,
                                   DateFormat dateFormat,
                                   Date[] defaultValue)
Returns the request parameter value as a Date array. In the returned array, each parameter value not convertible to a Date is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
defaultValue - a default value
Returns:
the request parameter value as a Date array

getDateValues

public static Date[] getDateValues(PortletRequest portletRequest,
                                   String param,
                                   DateFormat dateFormat)
Returns the portlet request parameter value as a Date array. In the returned array, each parameter value not convertible to a Date is replaced by the current date.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
Returns:
the portlet request parameter value as a Date array

getDateValues

public static Date[] getDateValues(PortletRequest portletRequest,
                                   String param,
                                   DateFormat dateFormat,
                                   Date[] defaultValue)
Returns the portlet request parameter value as a Date array. In the returned array, each parameter value not convertible to a Date is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
defaultValue - a default value
Returns:
the portlet request parameter value as a Date array

getDateValues

public static Date[] getDateValues(ServiceContext serviceContext,
                                   String param,
                                   DateFormat dateFormat)
Returns the service context parameter value as a Date array. In the returned array, each parameter value not convertible to a Date is replaced by the current date.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
Returns:
the service context parameter value as a Date array

getDateValues

public static Date[] getDateValues(ServiceContext serviceContext,
                                   String param,
                                   DateFormat dateFormat,
                                   Date[] defaultValue)
Returns the service context parameter value as a Date array. In the returned array, each parameter value not convertible to a Date is replaced by the default value.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
dateFormat - the format used to parse the date
defaultValue - a default value
Returns:
the service context parameter value as a Date array

getDouble

public static double getDouble(javax.servlet.http.HttpServletRequest request,
                               String param)
Returns the request parameter value as a double. If the parameter is missing or not convertible to a double, 0 is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a double

getDouble

public static double getDouble(javax.servlet.http.HttpServletRequest request,
                               String param,
                               double defaultValue)
Returns the request parameter value as a double. If the parameter is missing or not convertible to a double, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a double

getDouble

public static double getDouble(javax.servlet.http.HttpServletRequest request,
                               String param,
                               double defaultValue,
                               Locale locale)
Returns the request parameter value as a double. If the parameter is missing or not convertible to a double, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
locale - the locale used to parse the double value
Returns:
the request parameter value as a double

getDouble

public static double getDouble(javax.servlet.http.HttpServletRequest request,
                               String param,
                               Locale locale)
Returns the request parameter value as a double. If the parameter is missing or not convertible to a double, 0 is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
locale - the locale used to parse the double value
Returns:
the request parameter value as a double

getDouble

public static double getDouble(PortletRequest portletRequest,
                               String param)
Returns the portlet request parameter value as a double. If the parameter is missing or not convertible to a double, 0 is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a double

getDouble

public static double getDouble(PortletRequest portletRequest,
                               String param,
                               double defaultValue)
Returns the portlet request parameter value as a double. If the parameter is missing or not convertible to a double, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a double

getDouble

public static double getDouble(PortletRequest portletRequest,
                               String param,
                               double defaultValue,
                               Locale locale)
Returns the portlet request parameter value as a double. If the parameter is missing or not convertible to a double, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
locale - the locale used to parse the double value
Returns:
the portlet request parameter value as a double

getDouble

public static double getDouble(PortletRequest portletRequest,
                               String param,
                               Locale locale)
Returns the portlet request parameter value as a double. If the parameter is missing or not convertible to a double, 0 is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
locale - the locale used to parse the double value
Returns:
the portlet request parameter value as a double

getDouble

public static double getDouble(ServiceContext serviceContext,
                               String param)
Returns the service context parameter value as a double. If the parameter is missing or not convertible to a double, 0 is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a double

getDouble

public static double getDouble(ServiceContext serviceContext,
                               String param,
                               double defaultValue)
Returns the service context parameter value as a double. If the parameter is missing or not convertible to a double, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a double

getDoubleValues

public static double[] getDoubleValues(javax.servlet.http.HttpServletRequest request,
                                       String param)
Returns the request parameter value as a double array. In the returned array, each parameter value not convertible to a double is replaced by 0.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a double array

getDoubleValues

public static double[] getDoubleValues(javax.servlet.http.HttpServletRequest request,
                                       String param,
                                       double[] defaultValue)
Returns the request parameter value as a double array. In the returned array, each parameter value not convertible to a double is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a double array

getDoubleValues

public static double[] getDoubleValues(PortletRequest portletRequest,
                                       String param)
Returns the portlet request parameter value as a double array. In the returned array, each parameter value not convertible to a double is replaced by 0.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a double array

getDoubleValues

public static double[] getDoubleValues(PortletRequest portletRequest,
                                       String param,
                                       double[] defaultValue)
Returns the portlet request parameter value as a double array. In the returned array, each parameter value not convertible to a double is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a double array

getDoubleValues

public static double[] getDoubleValues(ServiceContext serviceContext,
                                       String param)
Returns the service context parameter value as a double array. In the returned array, each parameter value not convertible to a double is replaced by 0.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a double array

getDoubleValues

public static double[] getDoubleValues(ServiceContext serviceContext,
                                       String param,
                                       double[] defaultValue)
Returns the service context parameter value as a double array. In the returned array, each parameter value not convertible to a double is replaced by the default value.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a double array

getFloat

public static float getFloat(javax.servlet.http.HttpServletRequest request,
                             String param)
Returns the request parameter value as a float. If the parameter is missing or not convertible to a float, 0 is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a float

getFloat

public static float getFloat(javax.servlet.http.HttpServletRequest request,
                             String param,
                             float defaultValue)
Returns the request parameter value as a float. If the parameter is missing or not convertible to a float, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a float

getFloat

public static float getFloat(PortletRequest portletRequest,
                             String param)
Returns the portlet request parameter value as a float. If the parameter is missing or not convertible to a float, 0 is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a float

getFloat

public static float getFloat(PortletRequest portletRequest,
                             String param,
                             float defaultValue)
Returns the portlet request parameter value as a float. If the parameter is missing or not convertible to a float, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a float

getFloat

public static float getFloat(ServiceContext serviceContext,
                             String param)
Returns the service context parameter value as a float. If the parameter is missing or not convertible to a float, 0 is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a float

getFloat

public static float getFloat(ServiceContext serviceContext,
                             String param,
                             float defaultValue)
Returns the service context parameter value as a float. If the parameter is missing or not convertible to a float, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a float

getFloatValues

public static float[] getFloatValues(javax.servlet.http.HttpServletRequest request,
                                     String param)
Returns the request parameter value as a float array. In the returned array, each parameter value not convertible to a float is replaced by 0.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a float array

getFloatValues

public static float[] getFloatValues(javax.servlet.http.HttpServletRequest request,
                                     String param,
                                     float[] defaultValue)
Returns the request parameter value as a float array. In the returned array, each parameter value not convertible to a float is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a float array

getFloatValues

public static float[] getFloatValues(PortletRequest portletRequest,
                                     String param)
Returns the portlet request parameter value as a float array. In the returned array, each parameter value not convertible to a float is replaced by 0.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a float array

getFloatValues

public static float[] getFloatValues(PortletRequest portletRequest,
                                     String param,
                                     float[] defaultValue)
Returns the portlet request parameter value as a float array. In the returned array, each parameter value not convertible to a float is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a float array

getFloatValues

public static float[] getFloatValues(ServiceContext serviceContext,
                                     String param)
Returns the service context parameter value as a float array. In the returned array, each parameter value not convertible to a float is replaced by 0.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a float array

getFloatValues

public static float[] getFloatValues(ServiceContext serviceContext,
                                     String param,
                                     float[] defaultValue)
Returns the service context parameter value as a float array. In the returned array, each parameter value not convertible to a float is replaced by the default value.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a float array

getInteger

public static int getInteger(javax.servlet.http.HttpServletRequest request,
                             String param)
Returns the request parameter value as an integer. If the parameter is missing or not convertible to an integer, 0 is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as an integer

getInteger

public static int getInteger(javax.servlet.http.HttpServletRequest request,
                             String param,
                             int defaultValue)
Returns the request parameter value as an integer. If the parameter is missing or not convertible to an integer, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as an integer

getInteger

public static int getInteger(PortletRequest portletRequest,
                             String param)
Returns the portlet request parameter value as an integer. If the parameter is missing or not convertible to an integer, 0 is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as an integer

getInteger

public static int getInteger(PortletRequest portletRequest,
                             String param,
                             int defaultValue)
Returns the portlet request parameter value as an integer. If the parameter is missing or not convertible to an integer, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as an integer

getInteger

public static int getInteger(ServiceContext serviceContext,
                             String param)
Returns the service context parameter value as an integer. If the parameter is missing or not convertible to an integer, 0 is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as an integer

getInteger

public static int getInteger(ServiceContext serviceContext,
                             String param,
                             int defaultValue)
Returns the service context parameter value as an integer. If the parameter is missing or not convertible to an integer, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as an integer

getIntegerValues

public static int[] getIntegerValues(javax.servlet.http.HttpServletRequest request,
                                     String param)
Returns the request parameter value as an integer array. In the returned array, each parameter value not convertible to an integer is replaced by 0.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as an integer

getIntegerValues

public static int[] getIntegerValues(javax.servlet.http.HttpServletRequest request,
                                     String param,
                                     int[] defaultValue)
Returns the request parameter value as an integer array. In the returned array, each parameter value not convertible to an integer is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as an integer

getIntegerValues

public static int[] getIntegerValues(PortletRequest portletRequest,
                                     String param)
Returns the portlet request parameter value as an integer array. In the returned array, each parameter value not convertible to an integer is replaced by 0.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as an integer

getIntegerValues

public static int[] getIntegerValues(PortletRequest portletRequest,
                                     String param,
                                     int[] defaultValue)
Returns the portlet request parameter value as an integer array. In the returned array, each parameter value not convertible to an integer is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as an integer

getIntegerValues

public static int[] getIntegerValues(ServiceContext serviceContext,
                                     String param)
Returns the service context parameter value as an integer array. In the returned array, each parameter value not convertible to an integer is replaced by 0.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as an integer

getIntegerValues

public static int[] getIntegerValues(ServiceContext serviceContext,
                                     String param,
                                     int[] defaultValue)
Returns the service context parameter value as an integer array. In the returned array, each parameter value not convertible to an integer is replaced by the default value.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as an integer

getLong

public static long getLong(javax.servlet.http.HttpServletRequest request,
                           String param)
Returns the request parameter value as a long. If the parameter is missing or not convertible to a long, 0 is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a long

getLong

public static long getLong(javax.servlet.http.HttpServletRequest request,
                           String param,
                           long defaultValue)
Returns the request parameter value as a long. If the parameter is missing or not convertible to a long, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a long

getLong

public static long getLong(PortletRequest portletRequest,
                           String param)
Returns the portlet request parameter value as a long. If the parameter is missing or not convertible to a long, 0 is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a long

getLong

public static long getLong(PortletRequest portletRequest,
                           String param,
                           long defaultValue)
Returns the portlet request parameter value as a long. If the parameter is missing or not convertible to a long, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a long

getLong

public static long getLong(ServiceContext serviceContext,
                           String param)
Returns the service context parameter value as a long. If the parameter is missing or not convertible to a long, 0 is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a long

getLong

public static long getLong(ServiceContext serviceContext,
                           String param,
                           long defaultValue)
Returns the service context parameter value as a long. If the parameter is missing or not convertible to a long, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a long

getLongValues

public static long[] getLongValues(javax.servlet.http.HttpServletRequest request,
                                   String param)
Returns the request parameter value as a long array. In the returned array, each parameter value not convertible to a long is replaced by 0.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a long array

getLongValues

public static long[] getLongValues(javax.servlet.http.HttpServletRequest request,
                                   String param,
                                   long[] defaultValue)
Returns the request parameter value as a long array. In the returned array, each parameter value not convertible to a long is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a long array

getLongValues

public static long[] getLongValues(PortletRequest portletRequest,
                                   String param)
Returns the portlet request parameter value as a long array. In the returned array, each parameter value not convertible to a long is replaced by 0.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a long array

getLongValues

public static long[] getLongValues(PortletRequest portletRequest,
                                   String param,
                                   long[] defaultValue)
Returns the portlet request parameter value as a long array. In the returned array, each parameter value not convertible to a long is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a long array

getLongValues

public static long[] getLongValues(ServiceContext serviceContext,
                                   String param)
Returns the service context parameter value as a long array. In the returned array, each parameter value not convertible to a long is replaced by 0.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a long array

getLongValues

public static long[] getLongValues(ServiceContext serviceContext,
                                   String param,
                                   long[] defaultValue)
Returns the service context parameter value as a long array. In the returned array, each parameter value not convertible to a long is replaced by the default value.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a long array

getNumber

public static Number getNumber(javax.servlet.http.HttpServletRequest request,
                               String param)
Returns the request parameter value as a Number. If the parameter is missing or not convertible to a Number, 0 is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a Number

getNumber

public static Number getNumber(javax.servlet.http.HttpServletRequest request,
                               String param,
                               Number defaultValue)
Returns the request parameter value as a Number. If the parameter is missing or not convertible to a Number, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a Number

getNumber

public static Number getNumber(PortletRequest portletRequest,
                               String param)
Returns the portlet request parameter value as a Number. If the parameter is missing or not convertible to a Number, 0 is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a Number

getNumber

public static Number getNumber(PortletRequest portletRequest,
                               String param,
                               Number defaultValue)
Returns the portlet request parameter value as a Number. If the parameter is missing or not convertible to a Number, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a Number

getNumber

public static Number getNumber(ServiceContext serviceContext,
                               String param)
Returns the service context parameter value as a Number. If the parameter is missing or not convertible to a Number, 0 is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a Number

getNumber

public static Number getNumber(ServiceContext serviceContext,
                               String param,
                               Number defaultValue)
Returns the service context parameter value as a Number. If the parameter is missing or not convertible to a Number, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a Number

getNumberValues

public static Number[] getNumberValues(javax.servlet.http.HttpServletRequest request,
                                       String param)
Returns the request parameter value as a Number array. In the returned array, each parameter value not convertible to a Number is replaced by 0.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a Number array

getNumberValues

public static Number[] getNumberValues(javax.servlet.http.HttpServletRequest request,
                                       String param,
                                       Number[] defaultValue)
Returns the request parameter value as a Number array. In the returned array, each parameter value not convertible to a Number is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a Number array

getNumberValues

public static Number[] getNumberValues(PortletRequest portletRequest,
                                       String param)
Returns the portlet request parameter value as a Number array. In the returned array, each parameter value not convertible to a Number is replaced by 0.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a Number array

getNumberValues

public static Number[] getNumberValues(PortletRequest portletRequest,
                                       String param,
                                       Number[] defaultValue)
Returns the portlet request parameter value as a Number array. In the returned array, each parameter value not convertible to a Number is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a Number array

getNumberValues

public static Number[] getNumberValues(ServiceContext serviceContext,
                                       String param)
Returns the service context parameter value as a Number array. In the returned array, each parameter value not convertible to a Number is replaced by 0.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service request parameter value as a Number array

getNumberValues

public static Number[] getNumberValues(ServiceContext serviceContext,
                                       String param,
                                       Number[] defaultValue)
Returns the service context parameter value as a Number array. In the returned array, each parameter value not convertible to a Number is replaced by the default value.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service request parameter value as a Number array

getParameterValues

public static String[] getParameterValues(javax.servlet.http.HttpServletRequest request,
                                          String param)
Returns the request parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by a blank string.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a String array

getParameterValues

public static String[] getParameterValues(javax.servlet.http.HttpServletRequest request,
                                          String param,
                                          String[] defaultValue)
Returns the request parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a String array

getParameterValues

public static String[] getParameterValues(javax.servlet.http.HttpServletRequest request,
                                          String param,
                                          String[] defaultValue,
                                          boolean split)
Returns the request parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
split - whether to split the single parameter value using comma separators to get multiple values
Returns:
the request parameter value as a String array

getParameterValues

public static String[] getParameterValues(PortletRequest portletRequest,
                                          String param)
Returns the portlet request parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by a blank string.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a String array

getParameterValues

public static String[] getParameterValues(PortletRequest portletRequest,
                                          String param,
                                          String[] defaultValue)
Returns the portlet request parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a String array

getParameterValues

public static String[] getParameterValues(PortletRequest portletRequest,
                                          String param,
                                          String[] defaultValue,
                                          boolean split)
Returns the portlet request parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
split - whether to split the single parameter value using comma separators to get multiple values
Returns:
the portlet request parameter value as a String array

getShort

public static short getShort(javax.servlet.http.HttpServletRequest request,
                             String param)
Returns the request parameter value as a short. If the parameter is missing or not convertible to a short, 0 is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a short

getShort

public static short getShort(javax.servlet.http.HttpServletRequest request,
                             String param,
                             short defaultValue)
Returns the request parameter value as a short. If the parameter is missing or not convertible to a short, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a short

getShort

public static short getShort(PortletRequest portletRequest,
                             String param)
Returns the portlet request parameter value as a short. If the parameter is missing or not convertible to a short, 0 is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a short

getShort

public static short getShort(PortletRequest portletRequest,
                             String param,
                             short defaultValue)
Returns the portlet request parameter value as a short. If the parameter is missing or not convertible to a short, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a short

getShort

public static short getShort(ServiceContext serviceContext,
                             String param)
Returns the service context parameter value as a short. If the parameter is missing or not convertible to a short, 0 is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a short

getShort

public static short getShort(ServiceContext serviceContext,
                             String param,
                             short defaultValue)
Returns the service context parameter value as a short. If the parameter is missing or not convertible to a short, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a short

getShortValues

public static short[] getShortValues(javax.servlet.http.HttpServletRequest request,
                                     String param)
Returns the request parameter value as a short array. In the returned array, each parameter value not convertible to a short is replaced by 0.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a short array

getShortValues

public static short[] getShortValues(javax.servlet.http.HttpServletRequest request,
                                     String param,
                                     short[] defaultValue)
Returns the request parameter value as a short array. In the returned array, each parameter value not convertible to a short is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a short array

getShortValues

public static short[] getShortValues(PortletRequest portletRequest,
                                     String param)
Returns the portlet request parameter value as a short array. In the returned array, each parameter value not convertible to a short is replaced by 0.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a short array

getShortValues

public static short[] getShortValues(PortletRequest portletRequest,
                                     String param,
                                     short[] defaultValue)
Returns the portlet request parameter value as a short array. In the returned array, each parameter value not convertible to a short is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a short array

getShortValues

public static short[] getShortValues(ServiceContext serviceContext,
                                     String param)
Returns the service context parameter value as a short array. In the returned array, each parameter value not convertible to a short is replaced by 0.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a short array

getShortValues

public static short[] getShortValues(ServiceContext serviceContext,
                                     String param,
                                     short[] defaultValue)
Returns the service context parameter value as a short array. In the returned array, each parameter value not convertible to a short is replaced by the default value.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a short array

getString

public static String getString(javax.servlet.http.HttpServletRequest request,
                               String param)
Returns the request parameter value as a String. If the parameter is missing or not convertible to a String, a blank string is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a String

getString

public static String getString(javax.servlet.http.HttpServletRequest request,
                               String param,
                               String defaultValue)
Returns the request parameter value as a String. If the parameter is missing or not convertible to a String, the default value is returned.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a String

getString

public static String getString(PortletRequest portletRequest,
                               String param)
Returns the portlet request parameter value as a String. If the parameter is missing or not convertible to a String, a blank string is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a String

getString

public static String getString(PortletRequest portletRequest,
                               String param,
                               String defaultValue)
Returns the portlet request parameter value as a String. If the parameter is missing or not convertible to a String, the default value is returned.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a String

getString

public static String getString(ServiceContext serviceContext,
                               String param)
Returns the service context parameter value as a String. If the parameter is missing or not convertible to a String, a blank string is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a String

getString

public static String getString(ServiceContext serviceContext,
                               String param,
                               String defaultValue)
Returns the service context parameter value as a String. If the parameter is missing or not convertible to a String, the default value is returned.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a String

getStringValues

public static String[] getStringValues(javax.servlet.http.HttpServletRequest request,
                                       String param)
Returns the request parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by a blank string.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
Returns:
the request parameter value as a String array

getStringValues

public static String[] getStringValues(javax.servlet.http.HttpServletRequest request,
                                       String param,
                                       String[] defaultValue)
Returns the request parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by the default value.

Parameters:
request - the servlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the request parameter value as a String array

getStringValues

public static String[] getStringValues(PortletRequest portletRequest,
                                       String param)
Returns the portlet request parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by a blank string.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
Returns:
the portlet request parameter value as a String array

getStringValues

public static String[] getStringValues(PortletRequest portletRequest,
                                       String param,
                                       String[] defaultValue)
Returns the portlet request parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by the default value.

Parameters:
portletRequest - the portlet request from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the portlet request parameter value as a String array

getStringValues

public static String[] getStringValues(ServiceContext serviceContext,
                                       String param)
Returns the service context parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by a blank string.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
Returns:
the service context parameter value as a String array

getStringValues

public static String[] getStringValues(ServiceContext serviceContext,
                                       String param,
                                       String[] defaultValue)
Returns the service context parameter value as a String array. In the returned array, each parameter value not convertible to a String is replaced by the default value.

Parameters:
serviceContext - the service context from which to read the parameter
param - the name of the parameter
defaultValue - a default value
Returns:
the service context parameter value as a String array

print

public static void print(javax.servlet.http.HttpServletRequest request)
Prints all the request parameters as standard output.

Parameters:
request - the servlet request from which to read the parameters

print

public static void print(PortletRequest portletRequest)
Prints all the portlet request parameters as standard output.

Parameters:
portletRequest - the portlet request from which to read the parameters

print

public static void print(ServiceContext serviceContext)
Prints all the service context parameters as standard output.

Parameters:
serviceContext - the service context from which to read the parameters

Liferay 7.0-ga1 portal-kernel