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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? facesrequestattributes.java

?? spring framework 2.5.4源代碼
?? JAVA
字號:
/*
 * Copyright 2002-2008 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.context.request;

import java.lang.reflect.Method;
import java.util.Map;

import javax.faces.context.ExternalContext;
import javax.faces.context.FacesContext;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import org.springframework.util.Assert;
import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils;
import org.springframework.web.util.WebUtils;

/**
 * {@link RequestAttributes} adapter for a JSF {@link javax.faces.context.FacesContext}.
 * Used as default in a JSF environment, wrapping the current FacesContext.
 *
 * <p><b>NOTE:</b> In contrast to {@link ServletRequestAttributes}, this variant does
 * <i>not</i> support destruction callbacks for scoped attributes, neither for the
 * request scope nor for the session scope. If you rely on such implicit destruction
 * callbacks, consider defining a Spring {@link RequestContextListener} in your
 * <code>web.xml</code>.
 *
 * @author Juergen Hoeller
 * @since 2.5.2
 * @see javax.faces.context.FacesContext#getExternalContext()
 * @see javax.faces.context.ExternalContext#getRequestMap()
 * @see javax.faces.context.ExternalContext#getSessionMap()
 * @see RequestContextHolder#currentRequestAttributes()
 */
public class FacesRequestAttributes implements RequestAttributes {

	/**
	 * We'll create a lot of these objects, so we don't want a new logger every time.
	 */
	private static final Log logger = LogFactory.getLog(FacesRequestAttributes.class);

	private final FacesContext facesContext;


	/**
	 * Create a new FacesRequestAttributes adapter for the given FacesContext.
	 * @param facesContext the current FacesContext
	 * @see javax.faces.context.FacesContext#getCurrentInstance()
	 */
	public FacesRequestAttributes(FacesContext facesContext) {
		Assert.notNull(facesContext, "FacesContext must not be null");
		this.facesContext = facesContext;
	}


	/**
	 * Return the JSF FacesContext that this adapter operates on.
	 */
	protected FacesContext getFacesContext() {
		return this.facesContext;
	}

	/**
	 * Return the JSF ExternalContext that this adapter operates on.
	 * @see javax.faces.context.FacesContext#getExternalContext()
	 */
	protected ExternalContext getExternalContext() {
		return getFacesContext().getExternalContext();
	}

	/**
	 * Return the JSF attribute Map for the specified scope
	 * @param scope constant indicating request or session scope
	 * @return the Map representation of the attributes in the specified scope
	 * @see #SCOPE_REQUEST
	 * @see #SCOPE_SESSION
	 */
	protected Map getAttributeMap(int scope) {
		if (scope == SCOPE_REQUEST) {
			return getExternalContext().getRequestMap();
		}
		else {
			return getExternalContext().getSessionMap();
		}
	}


	public Object getAttribute(String name, int scope) {
		return getAttributeMap(scope).get(name);
	}

	public void setAttribute(String name, Object value, int scope) {
		getAttributeMap(scope).put(name, value);
	}

	public void removeAttribute(String name, int scope) {
		getAttributeMap(scope).remove(name);
	}

	public String[] getAttributeNames(int scope) {
		return StringUtils.toStringArray(getAttributeMap(scope).entrySet());
	}

	public void registerDestructionCallback(String name, Runnable callback, int scope) {
		if (logger.isWarnEnabled()) {
			logger.warn("Could not register destruction callback [" + callback + "] for attribute '" + name +
					"' because FacesRequestAttributes does not support such callbacks");
		}
	}

	public String getSessionId() {
		Object session = getExternalContext().getSession(true);
		try {
			// Both HttpSession and PortletSession have a getId() method.
			Method getIdMethod = session.getClass().getMethod("getId", new Class[0]);
			return ReflectionUtils.invokeMethod(getIdMethod, session).toString();
		}
		catch (NoSuchMethodException ex) {
			throw new IllegalStateException("Session object [" + session + "] does not have a getId() method");
		}
	}

	public Object getSessionMutex() {
		// Enforce presence of a session first to allow listeners
		// to create the mutex attribute, if any.
		Object session = getExternalContext().getSession(true);
		Object mutex = getExternalContext().getSessionMap().get(WebUtils.SESSION_MUTEX_ATTRIBUTE);
		if (mutex == null) {
			mutex = session;
		}
		return mutex;
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
自拍av一区二区三区| 亚洲精品国产a| 日本韩国精品在线| 美女网站在线免费欧美精品| 国产精品成人免费在线| 精品人伦一区二区色婷婷| 在线视频国内一区二区| 国产成人免费视| 日韩国产高清影视| 亚洲私人黄色宅男| 久久这里只精品最新地址| 欧美日韩免费在线视频| 99久久精品一区| 国产精品综合二区| 免费看欧美女人艹b| 亚洲精品久久嫩草网站秘色| 久久久国产精华| 日韩欧美久久久| 欧美撒尿777hd撒尿| a美女胸又www黄视频久久| 国产一区二区美女| 久久99久久99小草精品免视看| 亚洲一级二级三级| 一个色综合av| 亚洲欧美国产毛片在线| 国产精品久久久久四虎| 国产精品网站在线观看| 国产午夜精品一区二区三区视频 | 色综合久久综合中文综合网| 国产黑丝在线一区二区三区| 看片网站欧美日韩| 六月丁香婷婷色狠狠久久| 日本成人在线看| 日韩国产一区二| 午夜视频在线观看一区| 亚洲一区二区影院| 亚洲成a人片在线观看中文| 亚洲国产日韩综合久久精品| 亚洲综合色在线| 亚洲午夜久久久久中文字幕久| 亚洲欧美日韩在线不卡| 一区二区视频免费在线观看| 亚洲精品中文字幕在线观看| 综合网在线视频| 一区二区三区四区高清精品免费观看 | 成人ar影院免费观看视频| 国产91色综合久久免费分享| 国产激情偷乱视频一区二区三区| 国产综合成人久久大片91| 国产一区二区三区精品欧美日韩一区二区三区 | 日韩国产精品久久久| 日本三级亚洲精品| 蜜桃一区二区三区在线| 久久精品国产99久久6| 国产真实乱对白精彩久久| 成人午夜视频福利| 色综合一区二区| 欧美日韩国产首页在线观看| 欧美一级午夜免费电影| 久久精品日韩一区二区三区| 亚洲欧洲精品天堂一级| 亚洲成a人片在线不卡一二三区 | 精品国产免费久久| 欧美一区二视频| 91麻豆精品国产91久久久久久久久 | 久久久91精品国产一区二区精品| 久久精品视频在线免费观看 | 日本午夜精品视频在线观看| 免费观看在线综合| 丁香六月久久综合狠狠色| 一本色道久久综合狠狠躁的推荐| 欧美嫩在线观看| 精品99999| 日韩成人免费在线| 久久不见久久见中文字幕免费| 国产美女精品在线| 在线视频中文字幕一区二区| 精品免费国产二区三区| 国产精品电影一区二区三区| 午夜婷婷国产麻豆精品| 国产成人午夜精品影院观看视频| 一本色道久久综合精品竹菊| 欧美一区二区三区啪啪| 综合中文字幕亚洲| 麻豆一区二区三| 91一区一区三区| 日韩欧美在线123| 亚洲欧美自拍偷拍| 精品一区二区久久久| 91视频免费看| 精品三级在线看| 亚洲乱码国产乱码精品精的特点| 日本色综合中文字幕| 97久久精品人人做人人爽| 日韩欧美国产不卡| 一区二区三区日韩欧美精品| 国产综合久久久久影院| 欧美色男人天堂| 国产欧美视频一区二区三区| 日本在线不卡视频| 欧美日韩国产中文| 欧美一二三四在线| 国产精品不卡视频| 国产在线视频一区二区| 精品视频免费在线| 中文字幕欧美一| 国产一区二区美女| 欧美高清视频一二三区| 亚洲欧美日韩小说| 国产成人亚洲精品青草天美| 91精品中文字幕一区二区三区| ㊣最新国产の精品bt伙计久久| 精品亚洲国内自在自线福利| 5566中文字幕一区二区电影| 亚洲精品欧美激情| 91色九色蝌蚪| 国产精品日日摸夜夜摸av| 国产毛片精品一区| 日韩精品一区二区三区中文精品| 午夜亚洲国产au精品一区二区| 91一区二区三区在线播放| 久久精品夜色噜噜亚洲aⅴ| 毛片不卡一区二区| 555www色欧美视频| 肉丝袜脚交视频一区二区| 91免费版在线| 中文字幕一区二区三区精华液 | 国产成人精品影视| 欧美日韩精品系列| 亚洲精品自拍动漫在线| 成人av在线资源网站| 国产精品午夜电影| 成人黄色a**站在线观看| 久久久久88色偷偷免费| 久久97超碰色| 日韩欧美亚洲一区二区| 经典三级视频一区| 26uuuu精品一区二区| 国产在线视频一区二区三区| 欧美精品一区二区三区蜜桃 | 免费在线一区观看| 欧美剧在线免费观看网站| 一区二区成人在线| 欧美日韩中文国产| 日韩激情av在线| 日韩精品最新网址| 久久精品国产99久久6| 久久伊人蜜桃av一区二区| 国产成人在线观看免费网站| 国产亚洲制服色| 亚洲精品视频自拍| 日韩精品一区二区三区三区免费| 亚洲国产人成综合网站| 制服丝袜在线91| 蜜桃免费网站一区二区三区| 日韩欧美www| 国产高清不卡二三区| 国产精品久久久久aaaa| 色呦呦一区二区三区| 日韩和的一区二区| 精品欧美乱码久久久久久| 99v久久综合狠狠综合久久| 一区二区三区在线免费播放| 欧美性生活一区| 九九国产精品视频| 国产精品成人免费在线| 欧美视频一区二区三区| 麻豆免费看一区二区三区| 国产精品嫩草影院av蜜臀| 欧美丝袜自拍制服另类| 看片的网站亚洲| 国产精品乱子久久久久| 欧美亚洲综合久久| 粉嫩av亚洲一区二区图片| 精品日韩成人av| 最新久久zyz资源站| 一区二区三区四区精品在线视频| 欧美男生操女生| 国产传媒久久文化传媒| 久久精品999| 精品久久久久久久人人人人传媒 | 久久亚洲私人国产精品va媚药| 从欧美一区二区三区| 亚洲一区二区三区四区在线| 欧美v亚洲v综合ⅴ国产v| www.性欧美| 日韩**一区毛片| 日韩毛片高清在线播放| 精品电影一区二区| 91久久一区二区| 国产专区综合网| 亚洲黄网站在线观看| 久久综合九色欧美综合狠狠| 成人动漫一区二区在线| 蜜臀va亚洲va欧美va天堂| 国产精品拍天天在线| 日韩久久久久久| 欧美日本韩国一区| 成人av在线资源网站| 韩国av一区二区三区|