Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle
11g Release 2 (11.1.2.2.0)

E17481-03


oracle.adf.controller.v2.context
Class ServletFactoryFinder

java.lang.Object
  extended by oracle.adf.controller.v2.context.ServletFactoryFinder


public abstract class ServletFactoryFinder
extends java.lang.Object

Retrieve a factory from the servlet context.

Subclass PageLifecycleFactory to create your own PageLifecycleFactory and provide alternate PageLifecycle instance to all web page. Specify your PageLifecycleFactory subclass in the web-xml file using the ADFPageLifecycleFactory init param:

 <web-app>
   <context-param>
     <param-name>ADFPageLifecycleFactory</param-name>
     <param-value>mypackage.myLifecycleFactory</param-value>
   </context-param>
   ...
 </web-app>
 

If no alternate PageLifecycleFactory is defined in the web-xml, the default is to use DefaultPageLifecycleFactory.

Since:
10.1.3

Field Summary
static ServletFactoryFinder PAGELIFECYCLE_FACTORY
          Retrieve from the ServletContext a PageLifecycleFactory using the initParam ADFPageLifecycleFactory and of type PageLifecycleFactory This is used by the PageDefinitionTag in the Model 1 environment.

 

Constructor Summary
ServletFactoryFinder(java.lang.String factoryName, java.lang.String initParamName, java.lang.String contextAttributeName)
           

 

Method Summary
 java.lang.String getContextAttributeName()
          Return the servlet context attribute name used to save the instance of the factory for this web application.
protected abstract  java.lang.Object getDefaultFactory()
          Return the default factory instance
 java.lang.Object getFactory(javax.servlet.ServletContext servletContext)
          Helper method to instanciate the factory given the ServletContext.
 java.lang.String getFactoryName()
           
 java.lang.String getInitParamName()
          Return the servlet context init parameter name used to defined a custom factory

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

PAGELIFECYCLE_FACTORY

public static final ServletFactoryFinder PAGELIFECYCLE_FACTORY
Retrieve from the ServletContext a PageLifecycleFactory using the initParam ADFPageLifecycleFactory and of type PageLifecycleFactory This is used by the PageDefinitionTag in the Model 1 environment.

Constructor Detail

ServletFactoryFinder

public ServletFactoryFinder(java.lang.String factoryName,
                            java.lang.String initParamName,
                            java.lang.String contextAttributeName)

Method Detail

getFactory

public final java.lang.Object getFactory(javax.servlet.ServletContext servletContext)
Helper method to instanciate the factory given the ServletContext. The ServletContext possibly contain the class name of a sustitued factory as the value an init parameter. Once the factory class is determined, the instance is cached as a parameter of the servlet context.
Parameters:
servletContext -
Returns:
the factory

getFactoryName

public java.lang.String getFactoryName()

getInitParamName

public java.lang.String getInitParamName()
Return the servlet context init parameter name used to defined a custom factory

getContextAttributeName

public java.lang.String getContextAttributeName()
Return the servlet context attribute name used to save the instance of the factory for this web application.

getDefaultFactory

protected abstract java.lang.Object getDefaultFactory()
Return the default factory instance

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Lifecycle
11g Release 2 (11.1.2.2.0)

E17481-03


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