@Deprecated @Override public String[] getParameterValues(String name) { return ((PortletRequest)wrapped).getParameterValues(name); }
/** * Prints all the portlet request parameters as standard output. * * @param portletRequest the portlet request from which to read the * parameters */ public static void print(PortletRequest portletRequest) { Enumeration<String> enu = portletRequest.getParameterNames(); while (enu.hasMoreElements()) { String param = enu.nextElement(); String[] values = portletRequest.getParameterValues(param); for (int i = 0; i < values.length; i++) { System.out.println( StringBundler.concat( param, "[", String.valueOf(i), "] = ", values[i])); } } }
public static UnicodeProperties getProperties( PortletRequest portletRequest, String prefix) { UnicodeProperties properties = new UnicodeProperties(true); Map<String, String[]> parameterMap = portletRequest.getParameterMap(); for (String param : parameterMap.keySet()) { if (param.startsWith(prefix)) { String key = param.substring( prefix.length(), param.length() - 2); String[] values = portletRequest.getParameterValues(param); String value = StringUtil.merge(values); properties.setProperty(key, value); } } return properties; }
/** * The default behavior of this method is to call * <code>getParameterValues(name)</code> on the wrapped request object. */ public String[] getParameterValues(String name) { return request.getParameterValues(name); }
@Override protected String[] getAttribute(String key) { return _portletRequest.getParameterValues(key); }
String param = enu.nextElement(); String[] values = portletRequest.getParameterValues(param);
/** * Get an array of int parameters, throwing an exception if not found or one is not a number.. * @param request current portlet request * @param name the name of the parameter with multiple possible values * @throws PortletRequestBindingException a subclass of PortletException, * so it doesn't need to be caught */ public static int[] getRequiredIntParameters(PortletRequest request, String name) throws PortletRequestBindingException { return INT_PARSER.parseInts(name, request.getParameterValues(name)); }
/** * Get an array of String parameters, throwing an exception if not found or one is empty. * @param request current portlet request * @param name the name of the parameter * @throws PortletRequestBindingException a subclass of PortletException, * so it doesn't need to be caught */ public static String[] getRequiredStringParameters(PortletRequest request, String name) throws PortletRequestBindingException { return STRING_PARSER.validateRequiredStrings(name, request.getParameterValues(name)); }
public static boolean[] getBooleanValues( PortletRequest portletRequest, String param, boolean[] defaultValue) { return GetterUtil.getBooleanValues( portletRequest.getParameterValues(param), defaultValue); }
public static short[] getShortValues( PortletRequest portletRequest, String param, short[] defaultValue) { return GetterUtil.getShortValues( portletRequest.getParameterValues(param), defaultValue); }
/** {@inheritDoc} */ @SuppressWarnings("unchecked") public Collection<String[]> values() { List<String[]> list = new ArrayList<String[]>(); Enumeration<String> keys = request.getParameterNames(); while (keys.hasMoreElements()) { list.add(request.getParameterValues(keys.nextElement())); } return (list); }
/** * Get an array of long parameters, throwing an exception if not found or one is not a number. * @param request current portlet request * @param name the name of the parameter with multiple possible values * @throws PortletRequestBindingException a subclass of PortletException, * so it doesn't need to be caught */ public static long[] getRequiredLongParameters(PortletRequest request, String name) throws PortletRequestBindingException { return LONG_PARSER.parseLongs(name, request.getParameterValues(name)); }
public static void print(PortletRequest portletRequest) { Enumeration<String> enu = portletRequest.getParameterNames(); while (enu.hasMoreElements()) { String param = enu.nextElement(); String[] values = portletRequest.getParameterValues(param); for (int i = 0; i < values.length; i++) { System.out.println(param + "[" + i + "] = " + values[i]); } } }
/** * Get an array of int parameters, throwing an exception if not found or one is not a number.. * @param request current portlet request * @param name the name of the parameter with multiple possible values * @throws PortletRequestBindingException a subclass of PortletException, * so it doesn't need to be caught */ public static int[] getRequiredIntParameters(PortletRequest request, String name) throws PortletRequestBindingException { return INT_PARSER.parseInts(name, request.getParameterValues(name)); }
public static String[] getParameterValues(String arg0) { PortletRequest portletRequest = getPortletRequest(); if (portletRequest == null) { throw new IllegalStateException( "The request is not PortletRequest."); } return portletRequest.getParameterValues(arg0); }
/** * Get an array of long parameters, throwing an exception if not found or one is not a number. * @param request current portlet request * @param name the name of the parameter with multiple possible values * @throws PortletRequestBindingException a subclass of PortletException, * so it doesn't need to be caught */ public static long[] getRequiredLongParameters(PortletRequest request, String name) throws PortletRequestBindingException { return LONG_PARSER.parseLongs(name, request.getParameterValues(name)); }
/** * Get an array of String parameters, throwing an exception if not found or one is empty. * @param request current portlet request * @param name the name of the parameter * @throws PortletRequestBindingException a subclass of PortletException, * so it doesn't need to be caught */ public static String[] getRequiredStringParameters(PortletRequest request, String name) throws PortletRequestBindingException { return STRING_PARSER.validateRequiredStrings(name, request.getParameterValues(name)); }
/** * Get an array of float parameters, throwing an exception if not found or one is not a number. * @param request current portlet request * @param name the name of the parameter with multiple possible values * @throws PortletRequestBindingException a subclass of PortletException, * so it doesn't need to be caught */ public static float[] getRequiredFloatParameters(PortletRequest request, String name) throws PortletRequestBindingException { return FLOAT_PARSER.parseFloats(name, request.getParameterValues(name)); }
/** * Get an array of double parameters, throwing an exception if not found or one is not a number. * @param request current portlet request * @param name the name of the parameter with multiple possible values * @throws PortletRequestBindingException a subclass of PortletException, * so it doesn't need to be caught */ public static double[] getRequiredDoubleParameters(PortletRequest request, String name) throws PortletRequestBindingException { return DOUBLE_PARSER.parseDoubles(name, request.getParameterValues(name)); }
/** {@inheritDoc} */ public Set<Map.Entry<String, String[]>> entrySet() { Set<Map.Entry<String, String[]>> set = new HashSet<Map.Entry<String, String[]>>(); Enumeration<String> keys = request.getParameterNames(); String key; while (keys.hasMoreElements()) { key = keys.nextElement(); set.add(new MapEntry<String, String[]>(key, (request .getParameterValues(key)), false)); } return (set); }