com.boylesoftware.cb2.presentation.servlet
Class RequestProcessingContext

java.lang.Object
  extended bycom.boylesoftware.cb2.presentation.servlet.RequestProcessingContext

public class RequestProcessingContext
extends java.lang.Object

Request processor creates an instance of this class and keeps it as a request attribute during the whole request processing procedure. This class represents a collection of data and references that do not change during single request processing.

This class is not used directly in actions and presentation elements, instead ActionContext is used, which provides access to everything an instance of this class can give you access to. However, in certain situations when you don't have an action context (for example in custom JSP tags implementations), you can use services of this class directly given that its instance can be always easily found by calling get(HttpServletRequest request) static method.

Version:
$Id: RequestProcessingContext.java,v 1.2 2003/10/02 21:51:08 levahim Exp $
Author:
Lev Himmelfarb

Method Summary
static RequestProcessingContext get(javax.servlet.http.HttpServletRequest request)
          Gets the instance of request processing context for the specified request.
 ApplicationContext getApplicationContext()
          Gets out application context.
 BLManager getBLManager()
          Gets out business level manager.
 java.lang.String getBLSessionId()
          Gets id of the corresponding session in the business level.
 java.lang.String getRequestURL()
          Gets the requested by the client URL.
 UIState getUIState()
          Gets the UI state bean instance from the session.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

get

public static RequestProcessingContext get(javax.servlet.http.HttpServletRequest request)
Gets the instance of request processing context for the specified request.

Parameters:
request - HTTP request to lookup context for.
Returns:
reference to the context instance or null, which should never happen if the request went through the CB2 request processor.

getApplicationContext

public ApplicationContext getApplicationContext()
Gets out application context.

Returns:
reference to the application context.

getBLManager

public BLManager getBLManager()
Gets out business level manager.

Returns:
reference to the BL manager.

getRequestURL

public java.lang.String getRequestURL()
Gets the requested by the client URL. This method returns the URL originally requested by the client regardless any forwards and includes happened during the request processing. Note that the returned URL does not include an request parameters submitted using HTTP POST method, only those using the GET method and thus included in the request URL itself.

Returns:
the originally requested by the client URL.

getBLSessionId

public java.lang.String getBLSessionId()
Gets id of the corresponding session in the business level. BL manager maintains its own list of sessions that corresponds to the servlet container sessions and the business level sessions have different ids.

Returns:
the BL session id.

getUIState

public UIState getUIState()
Gets the UI state bean instance from the session.

Returns:
reference to the UI state instance.


Copyright © 2002,2003,2004 - Boyle Software, Inc.