Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.servlet
Interface BajaContext

All Known Implementing Classes:
BaseBajaContext

public interface BajaContext

Interface providing context information about the current request, and providing access to generic UIX Controller (Baja) services.


Method Summary
 void dispose()
          Frees any state stored on the BajaContext.
 Agent getAgent()
          Returns an Agent object that can be used to identify what device will be receiving the output.
 ErrorLog getErrorLog()
          Get an interface that can be used to log errors.
 LocaleContext getLocaleContext()
          Returns the client locale.
 PageDecoder getPageDecoder()
          Return the decoder used to transform URLs into Pages and PageEvents.
 PageEncoder getPageEncoder()
          Return the encoder used to transform Pages and PageEvents into URLs.
 java.lang.Object getProperty(java.lang.String namespace, java.lang.Object key)
          Gets a property stored on the context.
 java.lang.Object getService(java.lang.Class serviceClass, java.lang.Object serviceSelector)
          Returns a object registered on the context.
 javax.servlet.http.HttpServletRequest getServletRequest()
          Returns the servlet request object.
 javax.servlet.http.HttpServletResponse getServletResponse()
          Returns the servlet response object.
 StateManager getStateManager(boolean createIfNull)
          Returns the StateManager used to create States for Pages.
 void setLocaleContext(LocaleContext context)
          Sets the client locale.
 void setProperty(java.lang.String namespace, java.lang.Object key, java.lang.Object value)
          Stores a property on the context.
 

Method Detail

getServletRequest

public javax.servlet.http.HttpServletRequest getServletRequest()
Returns the servlet request object.

getServletResponse

public javax.servlet.http.HttpServletResponse getServletResponse()
Returns the servlet response object.

getLocaleContext

public LocaleContext getLocaleContext()
Returns the client locale.

setLocaleContext

public void setLocaleContext(LocaleContext context)
Sets the client locale.

getErrorLog

public ErrorLog getErrorLog()
Get an interface that can be used to log errors.

getAgent

public Agent getAgent()
Returns an Agent object that can be used to identify what device will be receiving the output.

getPageEncoder

public PageEncoder getPageEncoder()
Return the encoder used to transform Pages and PageEvents into URLs.

getPageDecoder

public PageDecoder getPageDecoder()
Return the decoder used to transform URLs into Pages and PageEvents.

getStateManager

public StateManager getStateManager(boolean createIfNull)
Returns the StateManager used to create States for Pages.

Parameters:
createIfNull - if true, will create a StateManager if one is not available or has expired.

getProperty

public java.lang.Object getProperty(java.lang.String namespace,
                                    java.lang.Object key)
Gets a property stored on the context.

setProperty

public void setProperty(java.lang.String namespace,
                        java.lang.Object key,
                        java.lang.Object value)
Stores a property on the context. Since BajaContexts are not persistent, state stored on a BajaContext will not be present in subsequent requests.

This method supports objects that implement the Bindable interface. Any such objects will automatically have bindValue() and unbindValue() called when added to and removed from the context.

See Also:
Bindable

getService

public java.lang.Object getService(java.lang.Class serviceClass,
                                   java.lang.Object serviceSelector)
Returns a object registered on the context. The default implementation of BajaContext allows retrieval of the ServletContext, Servlet, and PageBroker objects.

Parameters:
serviceClass - a class object that the returned object must be an instance of
serviceSelector - a selector object, if one is needed

dispose

public void dispose()
Frees any state stored on the BajaContext. Specifically, any properties that have been set that implement the Bindable interface will have unbindValue() called, then be removed from the context. This method is automatically called by PageBrokerHandler.

See Also:
setProperty(java.lang.String, java.lang.Object, java.lang.Object), Bindable

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

Copyright © 2002,2003, Oracle. All Rights Reserved.