Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

oracle.cabo.servlet.ui
Class BaseUIPageBroker

java.lang.Object
  |
  +--oracle.cabo.servlet.AbstractPageBroker
        |
        +--oracle.cabo.servlet.ui.BaseUIPageBroker
All Implemented Interfaces:
PageBroker
Direct Known Subclasses:
UIXPageBroker

public class BaseUIPageBroker
extends AbstractPageBroker

BaseUIPageBroker extends AbstractPageBroker to improve support for working with UIX Components. It supports setting up Configuration objects and supporting the use of UIFactory.

The following parameters are all deprecated, and will be removed in the future. BaseUIPageBroker supports a number of deprecated servlet configuration parameters; all of these can be set using WEB-INF/uix-config.xml, and that is the preferred mechanism.


Fields inherited from class oracle.cabo.servlet.AbstractPageBroker
EVENT_ERROR_KEY
 
Constructor Summary
BaseUIPageBroker()
          Creates a UIX PageBroker.
 
Method Summary
protected  ConfigurationImpl createDefaultConfiguration()
          Deprecated. Developers should use uix-config.xml to create configurations, and getConfigurationName() to access them.
protected  ApplicationConfiguration getApplicationConfiguration()
          Returns the ApplicationConfiguration available to this application.
protected  Configuration getConfiguration(BajaContext context, Page page)
          Deprecated. Developers should override getConfigurationName()
protected  java.lang.String getConfigurationName(BajaContext context, Page page)
          Returns the name of the configuration object that should be used for this page.
 java.lang.Object getService(BajaContext context, java.lang.Class serviceClass, java.lang.Object serviceSelector)
          Returns a object that provides some global service.
protected  UIExtension[] getUIExtensions()
          Returns all the added extensions.
 UIFactory getUIFactory()
          Gets the UIFactory, used for instantiating UI objects.
 Page handleRequest(BajaContext context, Page page, PageEvent event)
          Processes a request for a single page, returning the new page to display.
 void init(javax.servlet.Servlet servlet, javax.servlet.ServletConfig config)
          Initializes the page broker.
 void registerUIExtension(UIExtension extension)
          Adds a UIExtension to the system.
 void setUIFactory(UIFactory uiFactory)
          Sets the UIFactory, used for instantiating UI objects.
 
Methods inherited from class oracle.cabo.servlet.AbstractPageBroker
decodeMultipartRequest, destroy, doUploadFile, getDefaultPage, getErrorPage, getErrorPage, getEventError, getEventHandler, getFileUploadManager, getPageDescription, getPageFlowEngine, getPageRenderer, getServlet, isCacheable, isEmbedded, registerGlobalEventHandler, registerPageDescription, registerPageDescription, renderError, renderPage, requestEnded, requestStarted, resetGlobalEventHandlers, resetPageDescriptions, setDefaultPage, setEmbedded, setErrorPage, setFileUploadManager, setPageFlowEngine, setResponseHeaders, shouldHandleUploadFile, unregisterGlobalEventHandler, unregisterPageDescription
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseUIPageBroker

public BaseUIPageBroker()
Creates a UIX PageBroker.
Method Detail

handleRequest

public Page handleRequest(BajaContext context,
                          Page page,
                          PageEvent event)
                   throws PageEventException
Processes a request for a single page, returning the new page to display.
Overrides:
handleRequest in class AbstractPageBroker
Following copied from class: oracle.cabo.servlet.AbstractPageBroker
Parameters:
context - the BajaContext
page - the page the client is requesting
event - the event on that page, or null if the client is just requesting a page display
Throws:
PageEventException - if the processing of the event fails

getUIFactory

public UIFactory getUIFactory()
Gets the UIFactory, used for instantiating UI objects.

setUIFactory

public void setUIFactory(UIFactory uiFactory)
Sets the UIFactory, used for instantiating UI objects.

registerUIExtension

public void registerUIExtension(UIExtension extension)
Adds a UIExtension to the system. All Configurations created by this PageBroker will use these extensions.

getService

public java.lang.Object getService(BajaContext context,
                                   java.lang.Class serviceClass,
                                   java.lang.Object serviceSelector)
Returns a object that provides some global service. The default implementation of BajaContext.getService() will call this PageBroker method for any services it doesn't serve itself. BaseUIPageBroker supports:

Overrides:
getService in class AbstractPageBroker
Parameters:
context - the BajaContext
serviceClass - a class object that the returned object must be an instance of
serviceSelector - a selector object, if one is needed

init

public void init(javax.servlet.Servlet servlet,
                 javax.servlet.ServletConfig config)
          throws javax.servlet.ServletException
Description copied from class: AbstractPageBroker
Initializes the page broker. Subclasses must call super.init(servlet, config) if they override this method.
Overrides:
init in class AbstractPageBroker

getUIExtensions

protected UIExtension[] getUIExtensions()
Returns all the added extensions.
See Also:
registerUIExtension(oracle.cabo.ui.UIExtension)

getConfigurationName

protected java.lang.String getConfigurationName(BajaContext context,
                                                Page page)
Returns the name of the configuration object that should be used for this page. Generally, configurations will be defined in uix-config.xml, though you may also use the names of configurations you have created and registered elsewhere.

Returns:
the name of a configuration, or null to use the default configuration.

getConfiguration

protected Configuration getConfiguration(BajaContext context,
                                         Page page)
Deprecated. Developers should override getConfigurationName()

Returns the Configuration object that should be used for this invocation. By default, the Configuration instance returned by BaseUIPageBroker.createDefaultConfiguration() is used. Clients that use the same Configuration instance for all requests/pages should override createDefaultConfiguration().
See Also:
createDefaultConfiguration()

createDefaultConfiguration

protected ConfigurationImpl createDefaultConfiguration()
Deprecated. Developers should use uix-config.xml to create configurations, and getConfigurationName() to access them.

Returns the default Configuration instance to use for all requests. By default, the Configuration instance provided by ConfigurationImpl.sharedInstance() is used.

NB: Because Configuration objects are registered globally, they can never be garbage collected. Clients must be careful to cache the results of calling this method, and not call it repeatedly.


getApplicationConfiguration

protected final ApplicationConfiguration getApplicationConfiguration()
Returns the ApplicationConfiguration available to this application.

Oracle UIX API Reference
Release 2.1.22.0.0
B12196-01

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