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

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

?? abstractcontroller.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.portlet.mvc;

import javax.portlet.ActionRequest;
import javax.portlet.ActionResponse;
import javax.portlet.PortletException;
import javax.portlet.PortletSession;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
import javax.portlet.WindowState;

import org.springframework.web.portlet.ModelAndView;
import org.springframework.web.portlet.handler.PortletContentGenerator;
import org.springframework.web.portlet.util.PortletUtils;

/**
 * Convenient superclass for controller implementations, using the Template
 * Method design pattern.
 *
 * <p>As stated in the {@link Controller Controller}
 * interface, a lot of functionality is already provided by certain abstract
 * base controllers. The AbstractController is one of the most important
 * abstract base controller providing basic features such controlling if a
 * session is required and render caching.
 *
 * <p><b><a name="workflow">Workflow
 * (<a href="Controller.html#workflow">and that defined by interface</a>):</b><br>
 * <ol>
 *  <li>If this is an action request, {@link #handleActionRequest handleActionRequest}
 *      will be called by the DispatcherPortlet once to perform the action defined by this
 *      controller.</li>
 *  <li>If a session is required, try to get it (PortletException if not found).</li>
 *  <li>Call method {@link #handleActionRequestInternal handleActionRequestInternal},
 *      (optionally synchronizing around the call on the PortletSession),
 *      which should be overridden by extending classes to provide actual functionality to
 *      perform the desired action of the controller.  This will be executed only once.</li>
 *  <li>For a straight render request, or the render phase of an action request (assuming the
 *      same controller is called for the render phase -- see tip below),
 *      {@link #handleRenderRequest handleRenderRequest} will be called by the DispatcherPortlet
 *      repeatedly to render the display defined by this controller.</li>
 *  <li>If a session is required, try to get it (PortletException if none found).</li>
 *  <li>It will control caching as defined by the cacheSeconds property.</li>
 *  <li>Call method {@link #handleRenderRequestInternal handleRenderRequestInternal},
 *      (optionally synchronizing around the call on the PortletSession),
 *      which should be overridden by extending classes to provide actual functionality to
 *      return {@link org.springframework.web.portlet.ModelAndView ModelAndView} objects.
 *      This will be executed repeatedly as the portal updates the current displayed page.</li>
 * </ol>
 *
 * <p><b><a name="config">Exposed configuration properties</a>
 * (<a href="Controller.html#config">and those defined by interface</a>):</b><br>
 * <table border="1">
 *  <tr>
 *      <td><b>name</b></th>
 *      <td><b>default</b></td>
 *      <td><b>description</b></td>
 *  </tr>
 *  <tr>
 *      <td>requireSession</td>
 *      <td>false</td>
 *      <td>whether a session should be required for requests to be able to
 *          be handled by this controller. This ensures, derived controller
 *          can - without fear of Nullpointers - call request.getSession() to
 *          retrieve a session. If no session can be found while processing
 *          the request, a PortletException will be thrown</td>
 *  </tr>
 *  <tr>
 *      <td>synchronizeOnSession</td>
 *      <td>false</td>
 *      <td>whether the calls to <code>handleRenderRequestInternal</code> and
 *          <code>handleRenderRequestInternal</code> should be
 *          synchronized around the PortletSession, to serialize invocations
 *          from the same client. No effect if there is no PortletSession.
 *      </td>
 *  </tr>
 *  <tr>
 *      <td>cacheSeconds</td>
 *      <td>-1</td>
 *      <td>indicates the amount of seconds to specify caching is allowed in
 *          the render response generatedby  this request. 0 (zero) will indicate
 *          no caching is allowed at all, -1 (the default) will not override the
 *          portlet configuration and any positive number will cause the render
 *          response to declare the amount indicated as seconds to cache the content</td>
 *  </tr>
 *  <tr>
 *      <td>renderWhenMinimized</td>
 *      <td>false</td>
 *      <td>whether should be rendered when the portlet is in a minimized state --
 *          will return null for the ModelandView when the portlet is minimized
 *          and this is false</td>
 *  </tr>
 * </table>
 *
 * <p><b>TIP:</b> The controller mapping will be run twice by the PortletDispatcher for
 * action requests -- once for the action phase and again for the render phase.  You can
 * reach the render phase of a different controller by simply changing the values for the
 * criteria your mapping is using, such as portlet mode or a request parameter, during the
 * action phase of your controller.  This is very handy since redirects within the portlet
 * are apparently impossible.  Before doing this, it is usually wise to call
 * <code>clearAllRenderParameters</code> and then explicitly set all the parameters that
 * you want the new controller to see.  This avoids unexpected parameters from being passed
 * to the render phase of the second controller, such as the parameter indicating a form
 * submit ocurred in an <code>AbstractFormController</code>.
 *
 * <p>Thanks to Rainer Schmitz and Nick Lothian for their suggestions!
 *
 * @author John A. Lewis
 * @author Juergen Hoeller
 * @since 2.0
 */
public abstract class AbstractController extends PortletContentGenerator implements Controller {

	private boolean synchronizeOnSession = false;

	private boolean renderWhenMinimized = false;


	/**
	 * Set if controller execution should be synchronized on the session,
	 * to serialize parallel invocations from the same client.
	 * <p>More specifically, the execution of the <code>handleActionRequestInternal</code>
	 * method will get synchronized if this flag is "true". The best available
	 * session mutex will be used for the synchronization; ideally, this will
	 * be a mutex exposed by HttpSessionMutexListener.
	 * <p>The session mutex is guaranteed to be the same object during
	 * the entire lifetime of the session, available under the key defined
	 * by the <code>SESSION_MUTEX_ATTRIBUTE</code> constant. It serves as a
	 * safe reference to synchronize on for locking on the current session.
	 * <p>In many cases, the PortletSession reference itself is a safe mutex
	 * as well, since it will always be the same object reference for the
	 * same active logical session. However, this is not guaranteed across
	 * different servlet containers; the only 100% safe way is a session mutex.
	 * @see #handleActionRequestInternal
	 * @see org.springframework.web.util.HttpSessionMutexListener
	 * @see org.springframework.web.portlet.util.PortletUtils#getSessionMutex(javax.portlet.PortletSession)
	 */
	public final void setSynchronizeOnSession(boolean synchronizeOnSession) {
		this.synchronizeOnSession = synchronizeOnSession;
	}

	/**
	 * Return whether controller execution should be synchronized on the session.
	 */
	public final boolean isSynchronizeOnSession() {
		return this.synchronizeOnSession;
	}

	/**
	 * Set if the controller should render an view when the portlet is in
	 * a minimized window.  The default is false.
	 * @see javax.portlet.RenderRequest#getWindowState
	 * @see javax.portlet.WindowState#MINIMIZED
	 */
	public final void setRenderWhenMinimized(boolean renderWhenMinimized) {
		this.renderWhenMinimized = renderWhenMinimized;
	}

	/**
	 * Return whether controller will render when portlet is minimized.
	 */
	public final boolean isRenderWhenMinimized() {
		return this.renderWhenMinimized;
	}


	public void handleActionRequest(ActionRequest request, ActionResponse response) throws Exception {
		// Delegate to PortletContentGenerator for checking and preparing.
		check(request, response);

		// Execute in synchronized block if required.
		if (this.synchronizeOnSession) {
			PortletSession session = request.getPortletSession(false);
			if (session != null) {
				synchronized (session) {
					handleActionRequestInternal(request, response);
					return;
				}
			}
		}

		handleActionRequestInternal(request, response);
	}

	public ModelAndView handleRenderRequest(RenderRequest request, RenderResponse response) throws Exception {
		// If the portlet is minimized and we don't want to render then return null.
		if (WindowState.MINIMIZED.equals(request.getWindowState()) && !this.renderWhenMinimized) {
			return null;
		}
	    
		// Delegate to PortletContentGenerator for checking and preparing.
		checkAndPrepare(request, response);

		// Execute in synchronized block if required.
		if (this.synchronizeOnSession) {
			PortletSession session = request.getPortletSession(false);
			if (session != null) {
				Object mutex = PortletUtils.getSessionMutex(session);
				synchronized (mutex) {
					return handleRenderRequestInternal(request, response);
				}
			}
		}

		return handleRenderRequestInternal(request, response);
	}


	/**
	 * Subclasses are meant to override this method if the controller
	 * is expected to handle action requests. The contract is the same as
	 * for <code>handleActionRequest</code>.
	 * <p>The default implementation throws a PortletException.
	 * @see #handleActionRequest
	 * @see #handleRenderRequestInternal
	 */
	protected void handleActionRequestInternal(ActionRequest request, ActionResponse response)
			throws Exception {

		throw new PortletException("[" + getClass().getName() + "] does not handle action requests");
	}

	/**
	 * Subclasses are meant to override this method if the controller
	 * is expected to handle render requests. The contract is the same as
	 * for <code>handleRenderRequest</code>.
	 * <p>The default implementation throws a PortletException.
	 * @see #handleRenderRequest
	 * @see #handleActionRequestInternal
	 */
	protected ModelAndView handleRenderRequestInternal(RenderRequest request, RenderResponse response)
			throws Exception {

		throw new PortletException("[" + getClass().getName() + "] does not handle render requests");
	}

}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品自拍毛片| 亚洲在线视频网站| 亚洲色图一区二区三区| 亚洲一区二区三区精品在线| 欧美久久久影院| 精品国产一区二区三区忘忧草| 国产日韩欧美电影| 亚洲午夜视频在线观看| 韩国欧美国产一区| 色综合中文字幕| 国产91露脸合集magnet| 91精品办公室少妇高潮对白| 日韩色视频在线观看| 亚洲欧美一区二区视频| 国产一区二区三区在线观看免费视频| av资源网一区| 久久婷婷一区二区三区| 欧美日韩黄色影视| 国产精品亲子伦对白| 乱一区二区av| 欧美丰满高潮xxxx喷水动漫| 一区二区三区在线视频观看| 国产成人精品免费视频网站| 欧美一区二区女人| 亚洲一区二区三区美女| 中文字幕一区二区在线观看| 国产精品99久久久久久有的能看| 欧美电视剧免费全集观看| 亚洲另类在线视频| 99久久精品情趣| 亚洲欧洲成人自拍| www.欧美色图| 亚洲三级电影全部在线观看高清| 不卡的av网站| 亚洲欧美电影一区二区| 色琪琪一区二区三区亚洲区| 亚洲免费观看高清完整版在线观看 | 国产精品一区二区三区四区| 日韩天堂在线观看| 老汉av免费一区二区三区| 欧美日韩色一区| 久久精品国产精品亚洲红杏 | 视频一区中文字幕国产| 欧美一区二区福利在线| 激情综合色播激情啊| 国产精品丝袜91| 日韩精品一卡二卡三卡四卡无卡| 精品人在线二区三区| 成人国产精品免费网站| 午夜在线电影亚洲一区| www国产精品av| 欧美日韩一区中文字幕| 精品国偷自产国产一区| 成人污污视频在线观看| 日本成人在线一区| 专区另类欧美日韩| 久久综合给合久久狠狠狠97色69| 色先锋久久av资源部| 国产在线一区二区| 久久精品国产在热久久| 欧美精品高清视频| 欧美日本一区二区三区| 制服丝袜国产精品| 久久综合久久综合久久| 99精品国产热久久91蜜凸| 亚洲成人自拍偷拍| 国产精品欧美一区二区三区| 欧美日韩国产成人在线91| 成人一级黄色片| 蜜臀久久99精品久久久久久9 | 国产亚洲福利社区一区| 欧美伊人久久大香线蕉综合69 | 日韩丝袜美女视频| 欧美伊人久久久久久久久影院| 色狠狠av一区二区三区| 亚洲国产精品国自产拍av| 日韩午夜在线影院| 欧美日韩国产高清一区二区 | 亚洲精品免费在线播放| 亚洲精品综合在线| 亚洲国产你懂的| 麻豆成人久久精品二区三区红 | 三级影片在线观看欧美日韩一区二区| 亚洲不卡一区二区三区| 视频一区欧美精品| 麻豆91精品91久久久的内涵| 另类小说欧美激情| 国产91精品露脸国语对白| 国产成人免费视频网站高清观看视频| 91日韩在线专区| 色综合一区二区| 毛片一区二区三区| 成人毛片老司机大片| 在线观看91视频| 2023国产精华国产精品| 亚洲欧洲综合另类| 久久精品国产99久久6| 国产999精品久久久久久| 色综合天天综合网天天狠天天| 欧美性视频一区二区三区| 欧美一区二区三区啪啪| 中文文精品字幕一区二区| 亚洲一区二区免费视频| 风间由美一区二区三区在线观看 | 精品视频一区二区不卡| 欧美国产乱子伦| 国产成人8x视频一区二区 | 一二三区精品福利视频| 国产毛片一区二区| 99久久精品一区二区| 欧美一区二区成人| 亚洲男帅同性gay1069| 极品美女销魂一区二区三区免费| 色女孩综合影院| 国产亚洲综合av| 精品在线免费视频| 91精品在线观看入口| 亚洲国产精品麻豆| 欧美性大战久久久久久久| 国产精品短视频| av亚洲产国偷v产偷v自拍| 国产欧美精品一区aⅴ影院| 韩国av一区二区三区在线观看| 日韩精品专区在线影院观看| 欧美一级艳片视频免费观看| 亚洲国产一区在线观看| 欧美日韩电影在线播放| 日韩精品欧美成人高清一区二区| 欧美性受xxxx黑人xyx性爽| 亚洲第一二三四区| 欧美一卡2卡三卡4卡5免费| 九色综合狠狠综合久久| 26uuu久久天堂性欧美| 国产激情一区二区三区| 日韩一区中文字幕| 成人一道本在线| 久久久精品国产免大香伊| 92精品国产成人观看免费| 亚洲蜜臀av乱码久久精品| 色综合久久久久综合体| 亚洲电影激情视频网站| 日韩欧美精品在线视频| 亚洲一二三区在线观看| 欧美视频完全免费看| 国产专区欧美精品| 亚洲欧美区自拍先锋| 三级欧美韩日大片在线看| 久久久影视传媒| jlzzjlzz亚洲女人18| 久久成人久久鬼色| 亚洲宅男天堂在线观看无病毒| 欧美大片在线观看一区二区| 色欲综合视频天天天| 国产一区亚洲一区| 午夜精品一区二区三区三上悠亚| 欧美韩国日本不卡| 国内成人自拍视频| 天天综合天天做天天综合| 国产精品家庭影院| 国产人成亚洲第一网站在线播放| 91精品国产综合久久久久| 色94色欧美sute亚洲线路一ni| 国产尤物一区二区| 久久精品国产色蜜蜜麻豆| 亚洲国产视频在线| 性感美女久久精品| 欧美一区二区三区系列电影| 日本精品视频一区二区| 波多野结衣在线aⅴ中文字幕不卡| 九九九久久久精品| 黄色小说综合网站| 国产91高潮流白浆在线麻豆| 国产精品一级在线| 99久免费精品视频在线观看 | 日韩写真欧美这视频| 日韩欧美一级特黄在线播放| 精品影院一区二区久久久| 毛片基地黄久久久久久天堂| 国产资源在线一区| 99久久99久久免费精品蜜臀| 91久久精品一区二区| 欧美写真视频网站| 在线成人免费视频| 久久久国际精品| 亚洲一区在线观看网站| 国模少妇一区二区三区| 91免费看`日韩一区二区| 中文字幕的久久| 一区二区三区在线影院| 日本不卡视频在线| 成人免费观看视频| 欧美日韩精品欧美日韩精品一| 精品国产成人在线影院 | 九九国产精品视频| 不卡在线观看av| 不卡一区二区在线| 91视频在线看| 国产精品丝袜久久久久久app| 香蕉久久夜色精品国产使用方法| 成人激情文学综合网|