oracle.adf.controller.v2.context
Class ServletFactoryFinder
java.lang.Object
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
| 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 |
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.
ServletFactoryFinder
public ServletFactoryFinder(java.lang.String factoryName,
java.lang.String initParamName,
java.lang.String contextAttributeName)
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
Copyright © 1997, 2005, Oracle. All rights reserved.