Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

oracle.jbo.html
Class BC4JContext

java.lang.Object
  extended byoracle.jbo.html.BC4JContext

public class BC4JContext
extends java.lang.Object

BC4JContext define a set of method a BC4J Web application use to access attributes of the binding to the current BC4J model.

There is one BC4JContext per request and it can be retrieve from the request using the getContext method.

For a BC4J Web application using Struts, the BC4JContext is initialized by the BC4JRequestProcessor and the BC4JActionMapping classes.

Since:
JDeveloper 9.0.3

Field Summary
static java.lang.String ContextAttrName
          The request attributes key under which our BC4JContext instance will be stored.
 
Constructor Summary
BC4JContext()
           
 
Method Summary
 ApplicationModule getApplicationModule()
          Returns an application module instance from the sessionCookie
static BC4JContext getContext(javax.servlet.http.HttpServletRequest request)
          Return our BC4JContext given a HttpServletRequest
static BC4JContext getContext(javax.servlet.ServletRequest request)
          Return our BC4JContext given a ServletRequest
 java.lang.String getCurrentPath()
          Return the current servlet path.
 java.lang.String getEvent()
          Returns the event property.
 java.lang.String getPreviousPath()
          Return the previous servlet path.
 java.lang.String getProperty(java.lang.String key)
          Used to retrieve custom properties from the BC4JContext
 Row getRow()
          Retrieve the row property value If the row has not been set explicitly, this method use the rowkey information from this BC4JContext to retrieve the row.
 java.lang.String getRowkey()
          Return the rowkey property.
 SessionCookie getSessionCookie()
          Return the sessionCookie property.
 ViewObject getViewObject()
          Returns the viewObject property.
 void initialize(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Initialize the content the of the context using a request and response object.
 void setCurrentPath(java.lang.String value)
          Set the current servlet path.
 void setEvent(java.lang.String event)
          Set the event property value.
 void setPreviousPath(java.lang.String value)
          Set the previous servlet path.
 void setProperty(java.lang.String key, java.lang.String value)
          Used to store custom properties in the BC4JContext
 void setRow(Row row)
          Set the row property value
 void setRowkey(java.lang.String rowkey)
          Set the rowkey property value.
 void setSessionCookie(SessionCookie cookie)
          Set the sessionCookie property value.
 void setViewObject(ViewObject vo)
          Set the viewObject property value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ContextAttrName

public static final java.lang.String ContextAttrName
The request attributes key under which our BC4JContext instance will be stored.

See Also:
getContext(ServletRequest request), getContext(HttpServletRequest request), Constant Field Values
Constructor Detail

BC4JContext

public BC4JContext()
Method Detail

initialize

public void initialize(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
Initialize the content the of the context using a request and response object. This method look for specific request parameters and initialize the BC4JContext given their values.


getContext

public static final BC4JContext getContext(javax.servlet.ServletRequest request)
Return our BC4JContext given a ServletRequest

Parameters:
request - the current request
See Also:
ContextAttrName

getContext

public static final BC4JContext getContext(javax.servlet.http.HttpServletRequest request)
Return our BC4JContext given a HttpServletRequest

Parameters:
request - the current request
See Also:
ContextAttrName

getApplicationModule

public ApplicationModule getApplicationModule()
Returns an application module instance from the sessionCookie

See Also:
oracle.jbo.common.ampool.ApplicationModuleRef.useApplicationModule()

setViewObject

public void setViewObject(ViewObject vo)
Set the viewObject property value. This will overwrite the value set by the initialize method.


getViewObject

public ViewObject getViewObject()
Returns the viewObject property.


setEvent

public void setEvent(java.lang.String event)
Set the event property value. This will overwrite the value set by the initialize method.


getEvent

public java.lang.String getEvent()
Returns the event property.


setRowkey

public void setRowkey(java.lang.String rowkey)
Set the rowkey property value. This will overwrite the value set by the initialize method.


getRowkey

public java.lang.String getRowkey()
Return the rowkey property.


getSessionCookie

public SessionCookie getSessionCookie()
Return the sessionCookie property.


setSessionCookie

public void setSessionCookie(SessionCookie cookie)
Set the sessionCookie property value. This will overwrite the value set by the initialize method.


setPreviousPath

public void setPreviousPath(java.lang.String value)
Set the previous servlet path.


getPreviousPath

public java.lang.String getPreviousPath()
Return the previous servlet path. (servlet path of the previous request)


setCurrentPath

public void setCurrentPath(java.lang.String value)
Set the current servlet path.


getCurrentPath

public java.lang.String getCurrentPath()
Return the current servlet path.

See Also:
HttpServletRequest.getServletPath()

setProperty

public void setProperty(java.lang.String key,
                        java.lang.String value)
Used to store custom properties in the BC4JContext


getProperty

public java.lang.String getProperty(java.lang.String key)
Used to retrieve custom properties from the BC4JContext


setRow

public void setRow(Row row)
Set the row property value


getRow

public Row getRow()
Retrieve the row property value If the row has not been set explicitly, this method use the rowkey information from this BC4JContext to retrieve the row.

See Also:
oracle.jbo.client.JboUtil#getRowFromKey(RowSet, String)

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

 

Copyright © 1997, 2004, Oracle. All rights reserved.