|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectFactory
FlowControllerFactory
public class FlowControllerFactory
Factory for creating FlowController
s - user PageFlowController
s and SharedFlowController
s.
Constructor Summary | |
---|---|
protected |
FlowControllerFactory(ServletContext servletContext)
|
Method Summary | |
---|---|
PageFlowController |
createPageFlow(RequestContext context,
Class pageFlowClass)
Create a PageFlowController of the given type. |
PageFlowController |
createPageFlow(RequestContext context,
String pageFlowClassName)
Create a page flow of the given type. |
SharedFlowController |
createSharedFlow(RequestContext context,
Class sharedFlowClass)
Create a SharedFlowController of the given type. |
SharedFlowController |
createSharedFlow(RequestContext context,
String sharedFlowClassName)
Create a SharedFlowController of the given type. |
static FlowControllerFactory |
get(ServletContext servletContext)
Get a FlowControllerFactory. |
Class |
getFlowControllerClass(String className)
Get a FlowController class. |
static GlobalApp |
getGlobalApp(HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext)
Deprecated. Global.app is deprecated; use shared flows and getSharedFlowsForRequest(RequestContext) . |
static PageFlowController |
getPageFlow(Class pageFlowClass,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext)
Deprecated. Use createPageFlow(RequestContext, Class) instead. |
static PageFlowController |
getPageFlow(String pageFlowClassName,
HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext)
Deprecated. Use createPageFlow(RequestContext, String) instead. |
PageFlowController |
getPageFlowForPath(RequestContext context,
String path)
Get the page flow instance that should be associated with the given path. |
static PageFlowController |
getPageFlowForRelativeURI(HttpServletRequest request,
HttpServletResponse response,
String path,
ServletContext servletContext)
Deprecated. Use getPageFlowForPath(RequestContext, String) instead. |
static PageFlowController |
getPageFlowForRequest(HttpServletRequest request,
HttpServletResponse response,
ServletContext servletContext)
Deprecated. Use getPageFlowForRequest(RequestContext) instead. |
PageFlowController |
getPageFlowForRequest(RequestContext context)
Get the page flow instance that should be associated with the given request. |
static PageFlowController |
getPageFlowForURI(HttpServletRequest request,
HttpServletResponse response,
String uri,
ServletContext servletContext)
Deprecated. Use getPageFlowForPath(RequestContext, String) instead. The URI must be stripped of the
webapp context path before being passed. |
Map<String,SharedFlowController> |
getSharedFlowsForPath(RequestContext context,
String path)
Get the map of shared flows for the given path. |
Map<String,SharedFlowController> |
getSharedFlowsForRequest(RequestContext context)
Get the map of shared flows for the given request. |
Methods inherited from class Factory |
---|
getServletContext |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected FlowControllerFactory(ServletContext servletContext)
Method Detail |
---|
public static FlowControllerFactory get(ServletContext servletContext)
servletContext
- the current ServletContext.
public PageFlowController getPageFlowForRequest(RequestContext context) throws InstantiationException, IllegalAccessException
context
- a RequestContext
object which contains the current request and response.
PageFlowController
for the request, or null
if none was found.
InstantiationException
IllegalAccessException
public PageFlowController getPageFlowForPath(RequestContext context, String path) throws InstantiationException, IllegalAccessException
context
- a RequestContext
object which contains the current request and response.path
- a webapp-relative path. The path should not contain the webapp context path.
PageFlowController
for the given path, or null
if none was found.
InstantiationException
IllegalAccessException
public PageFlowController createPageFlow(RequestContext context, String pageFlowClassName) throws ClassNotFoundException, InstantiationException, IllegalAccessException
context
- a RequestContext
object which contains the current request and response.pageFlowClassName
- the type name of the desired page flow.
PageFlowController
, or null
if none was found.
ClassNotFoundException
InstantiationException
IllegalAccessException
public PageFlowController createPageFlow(RequestContext context, Class pageFlowClass) throws InstantiationException, IllegalAccessException
PageFlowController
of the given type. The PageFlowController stack (for
nesting) will be cleared or pushed, and the new instance will be stored as the current
PageFlowController.
context
- a RequestContext
object which contains the current request and response.pageFlowClass
- the type of the desired PageFlowController.
null
if none was found.
InstantiationException
IllegalAccessException
public SharedFlowController createSharedFlow(RequestContext context, String sharedFlowClassName) throws ClassNotFoundException, InstantiationException, IllegalAccessException
SharedFlowController
of the given type.
context
- a RequestContext
object which contains the current request and response.sharedFlowClassName
- the type name of the desired SharedFlowController.
null
if none was found.
ClassNotFoundException
InstantiationException
IllegalAccessException
public SharedFlowController createSharedFlow(RequestContext context, Class sharedFlowClass) throws InstantiationException, IllegalAccessException
SharedFlowController
of the given type.
context
- a RequestContext
object which contains the current request and response.sharedFlowClass
- the type of the desired SharedFlowController.
null
if none was found.
InstantiationException
IllegalAccessException
public Map<String,SharedFlowController> getSharedFlowsForRequest(RequestContext context) throws ClassNotFoundException, InstantiationException, IllegalAccessException
sharedFlowRefs
attribute of
Jpf.Controller
) in the page flow for the request.
context
- a RequestContext
object which contains the current request and response.
SharedFlowController
.
ClassNotFoundException
- if a declared shared flow class could not be found.
InstantiationException
- if a declared shared flow class could not be instantiated.
IllegalAccessException
- if a declared shared flow class was not accessible.public Map<String,SharedFlowController> getSharedFlowsForPath(RequestContext context, String path) throws ClassNotFoundException, InstantiationException, IllegalAccessException
sharedFlowRefs
attribute of
Jpf.Controller
) in the page flow for the path.
context
- a RequestContext
object which contains the current request and response.path
- a webapp-relative path. The path should not contain the webapp context path.
SharedFlowController
.
ClassNotFoundException
- if a declared shared flow class could not be found.
InstantiationException
- if a declared shared flow class could not be instantiated.
IllegalAccessException
- if a declared shared flow class was not accessible.public Class getFlowControllerClass(String className) throws ClassNotFoundException
className
- the name of the FlowController
class to load.
FlowController
class.
ClassNotFoundException
- if the requested class could not be found.public static PageFlowController getPageFlowForRequest(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
getPageFlowForRequest(RequestContext)
instead.
request
- the current HttpServletRequest.response
- the current HttpServletResponse.servletContext
- the current ServletContext.
PageFlowController
for the request, or null
if none was found.public static PageFlowController getPageFlowForURI(HttpServletRequest request, HttpServletResponse response, String uri, ServletContext servletContext)
getPageFlowForPath(RequestContext, String)
instead. The URI must be stripped of the
webapp context path before being passed.
request
- the current HttpServletRequest.response
- the current HttpServletResponse.uri
- a server-relative URI. The URI should contain the webapp context path.servletContext
- the current ServletContext.
PageFlowController
for the given URI, or null
if none was found.public static PageFlowController getPageFlowForRelativeURI(HttpServletRequest request, HttpServletResponse response, String path, ServletContext servletContext)
getPageFlowForPath(RequestContext, String)
instead.
request
- the current HttpServletRequest.response
- the current HttpServletResponse.path
- a webapp-relative path. The path should not contain the webapp context path.servletContext
- the current ServletContext.
PageFlowController
for the given path, or null
if none was found.public static PageFlowController getPageFlow(String pageFlowClassName, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
createPageFlow(RequestContext, String)
instead.
request
- the current HttpServletRequest.response
- the current HttpServletResponse.pageFlowClassName
- the type name of the desired page flow.servletContext
- the current ServletContext.
PageFlowController
, or null
if none was found.public static GlobalApp getGlobalApp(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
getSharedFlowsForRequest(RequestContext)
.
request
- the current HttpServletRequest.response
- the current HttpServletResponse.
GlobalApp
instance, or a new one (based on Global.app) if none is found.
If Global.app does not exist in the current webapp, null
is returned.public static PageFlowController getPageFlow(Class pageFlowClass, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext)
createPageFlow(RequestContext, Class)
instead.
request
- the current HttpServletRequest.response
- the current HttpServletResponse.pageFlowClass
- the type of the desired page flow.servletContext
- the current ServletContext.
PageFlowController
, or null
if none was found.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |