亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? portletrequestutils.java

?? spring framework 2.5.4源代碼
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * Copyright 2002-2007 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.springframework.web.portlet.bind;

import javax.portlet.PortletRequest;

/**
 * Parameter extraction methods, for an approach distinct from data binding,
 * in which parameters of specific types are required.
 *
 * <p>This approach is very useful for simple submissions, where binding
 * request parameters to a command object would be overkill.
 *
 * @author Juergen Hoeller
 * @author Keith Donald
 * @author John A. Lewis
 * @since 2.0
 */
public abstract class PortletRequestUtils {

	private static final IntParser INT_PARSER = new IntParser();

	private static final LongParser LONG_PARSER = new LongParser();

	private static final FloatParser FLOAT_PARSER = new FloatParser();

	private static final DoubleParser DOUBLE_PARSER = new DoubleParser();

	private static final BooleanParser BOOLEAN_PARSER = new BooleanParser();

	private static final StringParser STRING_PARSER = new StringParser();


	/**
	 * Get an Integer parameter, or <code>null</code> if not present.
	 * Throws an exception if it the parameter value isn't a number.
	 * @param request current portlet request
	 * @param name the name of the parameter
	 * @return the Integer value, or <code>null</code> if not present
	 * @throws PortletRequestBindingException a subclass of PortletException,
	 * so it doesn't need to be caught
	 */
	public static Integer getIntParameter(PortletRequest request, String name)
			throws PortletRequestBindingException {

		if (request.getParameter(name) == null) {
			return null;
		}
		return new Integer(getRequiredIntParameter(request, name));
	}

	/**
	 * Get an int parameter, with a fallback value. Never throws an exception.
	 * Can pass a distinguished value as default to enable checks of whether it was supplied.
	 * @param request current portlet request
	 * @param name the name of the parameter
	 * @param defaultVal the default value to use as fallback
	 */
	public static int getIntParameter(PortletRequest request, String name, int defaultVal) {
		if (request.getParameter(name) == null) {
			return defaultVal;
		}
		try {
			return getRequiredIntParameter(request, name);
		}
		catch (PortletRequestBindingException ex) {
			return defaultVal;
		}
	}

	/**
	 * Get an array of int parameters, return an empty array if not found.
	 * @param request current portlet request
	 * @param name the name of the parameter with multiple possible values
	 */
	public static int[] getIntParameters(PortletRequest request, String name) {
		try {
			return getRequiredIntParameters(request, name);
		}
		catch (PortletRequestBindingException ex) {
			return new int[0];
		}
	}

	/**
	 * Get an int parameter, throwing an exception if it isn't found or isn't a number.
	 * @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 int getRequiredIntParameter(PortletRequest request, String name)
			throws PortletRequestBindingException {

		return INT_PARSER.parseInt(name, request.getParameter(name));
	}

	/**
	 * 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 a Long parameter, or <code>null</code> if not present.
	 * Throws an exception if it the parameter value isn't a number.
	 * @param request current portlet request
	 * @param name the name of the parameter
	 * @return the Long value, or <code>null</code> if not present
	 * @throws PortletRequestBindingException a subclass of PortletException,
	 * so it doesn't need to be caught
	 */
	public static Long getLongParameter(PortletRequest request, String name)
			throws PortletRequestBindingException {

		if (request.getParameter(name) == null) {
			return null;
		}
		return new Long(getRequiredLongParameter(request, name));
	}

	/**
	 * Get a long parameter, with a fallback value. Never throws an exception.
	 * Can pass a distinguished value as default to enable checks of whether it was supplied.
	 * @param request current portlet request
	 * @param name the name of the parameter
	 * @param defaultVal the default value to use as fallback
	 */
	public static long getLongParameter(PortletRequest request, String name, long defaultVal) {
		if (request.getParameter(name) == null) {
			return defaultVal;
		}
		try {
			return getRequiredLongParameter(request, name);
		}
		catch (PortletRequestBindingException ex) {
			return defaultVal;
		}
	}

	/**
	 * Get an array of long parameters, return an empty array if not found.
	 * @param request current portlet request
	 * @param name the name of the parameter with multiple possible values
	 */
	public static long[] getLongParameters(PortletRequest request, String name) {
		try {
			return getRequiredLongParameters(request, name);
		}
		catch (PortletRequestBindingException ex) {
			return new long[0];
		}
	}

	/**
	 * Get a long parameter, throwing an exception if it isn't found or isn't a number.
	 * @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 long getRequiredLongParameter(PortletRequest request, String name)
			throws PortletRequestBindingException {

		return LONG_PARSER.parseLong(name, request.getParameter(name));
	}

	/**
	 * 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 a Float parameter, or <code>null</code> if not present.
	 * Throws an exception if it the parameter value isn't a number.
	 * @param request current portlet request
	 * @param name the name of the parameter
	 * @return the Float value, or <code>null</code> if not present
	 * @throws PortletRequestBindingException a subclass of PortletException,
	 * so it doesn't need to be caught
	 */
	public static Float getFloatParameter(PortletRequest request, String name)
			throws PortletRequestBindingException {

		if (request.getParameter(name) == null) {
			return null;
		}
		return new Float(getRequiredFloatParameter(request, name));
	}

	/**
	 * Get a float parameter, with a fallback value. Never throws an exception.
	 * Can pass a distinguished value as default to enable checks of whether it was supplied.
	 * @param request current portlet request
	 * @param name the name of the parameter
	 * @param defaultVal the default value to use as fallback
	 */
	public static float getFloatParameter(PortletRequest request, String name, float defaultVal) {
		if (request.getParameter(name) == null) {
			return defaultVal;
		}
		try {
			return getRequiredFloatParameter(request, name);
		}
		catch (PortletRequestBindingException ex) {
			return defaultVal;
		}
	}

	/**
	 * Get an array of float parameters, return an empty array if not found.
	 * @param request current portlet request
	 * @param name the name of the parameter with multiple possible values
	 */
	public static float[] getFloatParameters(PortletRequest request, String name) {
		try {
			return getRequiredFloatParameters(request, name);
		}
		catch (PortletRequestBindingException ex) {
			return new float[0];
		}
	}

	/**
	 * Get a float parameter, throwing an exception if it isn't found or isn't a number.
	 * @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 float getRequiredFloatParameter(PortletRequest request, String name)
			throws PortletRequestBindingException {

		return FLOAT_PARSER.parseFloat(name, request.getParameter(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 a Double parameter, or <code>null</code> if not present.
	 * Throws an exception if it the parameter value isn't a number.
	 * @param request current portlet request
	 * @param name the name of the parameter
	 * @return the Double value, or <code>null</code> if not present
	 * @throws PortletRequestBindingException a subclass of PortletException,
	 * so it doesn't need to be caught
	 */
	public static Double getDoubleParameter(PortletRequest request, String name)
			throws PortletRequestBindingException {

		if (request.getParameter(name) == null) {
			return null;
		}
		return new Double(getRequiredDoubleParameter(request, name));
	}

	/**
	 * Get a double parameter, with a fallback value. Never throws an exception.
	 * Can pass a distinguished value as default to enable checks of whether it was supplied.
	 * @param request current portlet request
	 * @param name the name of the parameter
	 * @param defaultVal the default value to use as fallback
	 */
	public static double getDoubleParameter(PortletRequest request, String name, double defaultVal) {
		if (request.getParameter(name) == null) {
			return defaultVal;
		}
		try {
			return getRequiredDoubleParameter(request, name);
		}
		catch (PortletRequestBindingException ex) {
			return defaultVal;
		}
	}

	/**
	 * Get an array of double parameters, return an empty array if not found.
	 * @param request current portlet request
	 * @param name the name of the parameter with multiple possible values
	 */
	public static double[] getDoubleParameters(PortletRequest request, String name) {
		try {
			return getRequiredDoubleParameters(request, name);
		}
		catch (PortletRequestBindingException ex) {
			return new double[0];
		}
	}

	/**
	 * Get a double parameter, throwing an exception if it isn't found or isn't a number.
	 * @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 double getRequiredDoubleParameter(PortletRequest request, String name)
			throws PortletRequestBindingException {

		return DOUBLE_PARSER.parseDouble(name, request.getParameter(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,

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩1区2区3区| 一区二区中文字幕在线| av电影一区二区| 欧美a级一区二区| 丝袜美腿亚洲一区二区图片| 亚洲图片欧美一区| 亚洲欧美日韩国产手机在线 | 国产91富婆露脸刺激对白| 午夜影院久久久| 日韩vs国产vs欧美| 美女精品一区二区| 久久97超碰国产精品超碰| 国产在线精品一区二区| 国产成人亚洲精品青草天美| 国产夫妻精品视频| 99久久久无码国产精品| 欧洲一区在线观看| 3d成人h动漫网站入口| 日韩亚洲欧美在线观看| 久久久久久久久岛国免费| 国产欧美中文在线| 亚洲精品国产高清久久伦理二区| 亚洲综合清纯丝袜自拍| 日韩国产欧美一区二区三区| 激情小说欧美图片| 懂色av一区二区夜夜嗨| 91精品国产黑色紧身裤美女| 精品国产一区二区三区不卡| 国产精品人妖ts系列视频| 一区二区在线观看免费视频播放| 亚洲成人久久影院| 国产精品1024久久| 97精品久久久午夜一区二区三区| 欧美精品精品一区| 国产片一区二区| 亚洲一区在线视频| 精品少妇一区二区三区| 亚洲丝袜制服诱惑| 美女mm1313爽爽久久久蜜臀| 成人av资源站| 日韩午夜在线播放| 亚洲色图视频网站| 精品一区二区三区在线播放| 99久久久无码国产精品| 欧美mv日韩mv亚洲| 亚洲美女精品一区| 国产精品18久久久久久久久久久久| 在线精品视频一区二区三四| 成人午夜精品在线| 欧美久久久久久久久| 国产精品九色蝌蚪自拍| 激情欧美一区二区三区在线观看| 色偷偷成人一区二区三区91| 欧美精品一区在线观看| 亚洲一区二区三区精品在线| 国产99精品在线观看| 日韩欧美二区三区| 亚洲超碰精品一区二区| 色综合色狠狠综合色| 久久亚洲精品小早川怜子| 日韩电影在线观看一区| av欧美精品.com| 国产精品福利在线播放| 国产老女人精品毛片久久| 欧美一区二区三区视频免费| 亚洲一级在线观看| 国产精品视频看| 国产在线精品一区二区夜色 | 国产精品久久久久久亚洲伦| 美女性感视频久久| 欧美精选在线播放| 亚洲v中文字幕| 欧美综合色免费| 亚洲一级电影视频| 91官网在线免费观看| 亚洲精品国产a| 欧美视频精品在线| 亚洲国产精品一区二区久久恐怖片| 色诱视频网站一区| 亚洲精品高清在线| 欧美日韩精品免费观看视频| 亚洲主播在线播放| 欧美日韩三级视频| 日日欢夜夜爽一区| 欧美刺激午夜性久久久久久久| 免费观看30秒视频久久| 日韩免费视频一区二区| 国产麻豆精品theporn| 久久―日本道色综合久久| 国产成人综合在线观看| 中文字幕巨乱亚洲| 色999日韩国产欧美一区二区| 亚洲国产视频在线| 欧美一个色资源| 国产高清久久久久| 亚洲欧美一区二区久久| 欧美日韩国产在线观看| 麻豆极品一区二区三区| 国产日产亚洲精品系列| jlzzjlzz亚洲日本少妇| 欧美影院精品一区| 免费在线观看一区二区三区| 久久精品日韩一区二区三区| 91视频91自| 国产成人精品www牛牛影视| 免费国产亚洲视频| 欧美国产一区视频在线观看| 色欧美日韩亚洲| 久久不见久久见免费视频1 | av资源网一区| 亚洲国产成人av好男人在线观看| 91精品免费在线| 成人精品鲁一区一区二区| 亚洲超丰满肉感bbw| 国产午夜精品一区二区三区视频 | 日韩av高清在线观看| 久久美女高清视频| 欧美视频一区二区三区在线观看| 日韩av电影一区| 一区二区三区蜜桃| 久久免费电影网| 欧美日韩在线三级| 成人av在线一区二区| 蜜臀久久99精品久久久久宅男| 亚洲美女屁股眼交| 欧美经典一区二区| 日韩美女一区二区三区四区| 色悠久久久久综合欧美99| 国产成人免费av在线| 中文字幕中文字幕一区二区| 欧美一级日韩免费不卡| 在线日韩一区二区| 国产激情偷乱视频一区二区三区| 天使萌一区二区三区免费观看| 国产精品乱人伦中文| 久久久久亚洲蜜桃| 欧美成va人片在线观看| 欧美日韩精品欧美日韩精品一综合| 99国产欧美久久久精品| 福利电影一区二区| 国产激情一区二区三区| 韩国视频一区二区| 日韩成人免费电影| 丝袜美腿亚洲一区二区图片| 久久成人综合网| 91麻豆精品在线观看| 成人免费的视频| 国产二区国产一区在线观看| 狠狠色丁香久久婷婷综合_中| 视频一区欧美日韩| 亚洲va欧美va人人爽午夜 | 亚洲超碰97人人做人人爱| 亚洲精品免费播放| 亚洲另类在线制服丝袜| 亚洲激情自拍偷拍| 亚洲伊人伊色伊影伊综合网| 一区二区三区在线免费观看| 一区二区成人在线| 亚洲成人你懂的| 亚洲一区二区三区在线看| 亚洲另类春色国产| 亚洲不卡在线观看| 蜜桃av一区二区| 激情综合一区二区三区| 国产精品乡下勾搭老头1| 国产一区二区三区久久久| 国产一区二区三区四区五区美女| 国产在线观看一区二区| 国产一区 二区 三区一级| 国产成人亚洲精品青草天美| av亚洲精华国产精华| 欧美在线色视频| 欧美一区二区在线播放| 久久综合九色综合欧美亚洲| 欧美国产禁国产网站cc| 一区二区三区免费在线观看| 日本欧美久久久久免费播放网| 激情伊人五月天久久综合| 91在线免费播放| 制服视频三区第一页精品| 日韩一区二区三区电影在线观看 | 欧美肥大bbwbbw高潮| 精品国产亚洲在线| 国产精品国产三级国产| 亚洲国产美国国产综合一区二区 | 国产精品久久久久久久久免费相片| 亚洲欧美日韩在线播放| 成人高清伦理免费影院在线观看| 日本久久精品电影| 欧美α欧美αv大片| 国产精品成人午夜| 老司机精品视频线观看86| 国产盗摄女厕一区二区三区| 欧美日韩成人在线| 国产精品乱人伦中文| 裸体一区二区三区| 色av成人天堂桃色av| 久久久久久久久久看片| 午夜精品爽啪视频| eeuss鲁片一区二区三区在线观看|