| java.lang.Object org.apache.beehive.netui.pageflow.PageFlowManagedObject org.apache.beehive.netui.pageflow.FlowController
All known Subclasses: org.apache.beehive.netui.pageflow.PageFlowController, org.apache.beehive.netui.pageflow.SharedFlowController,
Inner Class :static class PerRequestState | |
Method Summary | |
protected void | addActionError(String propertyName, String messageKey, Object[] messageArgs) Add a property-related message that will be shown with the Errors and Error tags. | protected void | addActionErrorExpression(String propertyName, String expression, Object[] messageArgs) Add a property-related message as an expression that will be evaluated and shown with the Errors and Error tags. | protected void | addValidationError(String propertyName, String messageKey, Object[] messageArgs) Add a validation error that will be shown with the Errors and Error tags. | protected void | addValidationError(String propertyName, String messageKey) Add a validation error that will be shown with the Errors and Error tags. | protected synchronized void | afterAction() Callback that occurs after any user action method is invoked. | protected boolean | alwaysTrackPreviousAction() When this FlowController does not use a
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation with a
navigateTo=
org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo.previousAction Jpf.NavigateTo.previousAction attribute, the following methods always return null by default. | protected boolean | alwaysTrackPreviousPage() When this FlowController does not use a
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation with either a
navigateTo =
org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo.currentPage Jpf.NavigateTo.currentPage attribute or a
navigateTo =
org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo.previousPage Jpf.NavigateTo.previousPage attribute, the following methods always return null by default. | protected synchronized void | beforeAction() Callback that occurs before any user action method is invoked. | public synchronized void | create(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) Initialize after object creation. | NotLoggedInException | createNotLoggedInException(String actionName, HttpServletRequest request) | void | decrementRequestCount(HttpServletRequest request) | void | destroy(HttpSession session) Internal destroy method that is invoked when this object is being removed from the session. | public ActionForward | execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) Perform decision logic to determine the next URI to be displayed.
Parameters: mapping - the Struts ActionMapping for the current action being processed. Parameters: form - the form-bean (if any) associated with the Struts action being processed. | ActionForward | forwardTo(ActionForward fwd, ActionMapping mapping, PageFlowExceptionConfig exceptionConfig, String actionName, ModuleConfig altModuleConfig, ActionForm form, HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) | protected String | generateToken(HttpServletRequest request) Generate a new transaction token, to be used for enforcing a single request for a particular transaction. | protected String | generateToken() Generate a new transaction token, to be used for enforcing a single request for a particular transaction. | final protected ActionMapping | getActionMapping() Get the current Struts ActionMapping, which is information from the Struts-XML <action>
tag that corresponds to the current action being executed. | protected Method | getActionMethod(String methodName, Class argType) Get an action handler method of the given name/signature.
Parameters: methodName - the name of the action handler method to query. Parameters: argType - the type of the argument to the action handler method; if null ,the method takes no arguments. | ActionForward | getActionMethodForward(String actionName, Object inputForm, HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) Get the ActionForward returned by the action handler method that corresponds to the
given action name and form-bean, or send an error to the browser if there is no
matching method.
Parameters: actionName - the name of the Struts action to handle. Parameters: inputForm - the form-bean associated with the action. | public MutableURI | getActionURI(String actionName) Create a raw action URI, which can be modified before being sent through the registered URL rewriting chain
using
org.apache.beehive.netui.core.urls.URLRewriterService.rewriteURL .
Parameters: actionName - the action name to convert into a MutableURI; may be qualified with a path from the webapproot, in which case the parent directory from the current request is not used. | protected String[] | getActions() Get a list of the names of actions handled by methods in this PageFlowController. | protected String | getCurrentActionName() Get the name of the current action being executed. | protected DataSource | getDataSource(HttpServletRequest request) Return the default data source for the Struts module associated with this FlowController. | protected DataSource | getDataSource(HttpServletRequest request, String key) Return the specified data source for the current Struts module. | protected static Locale | getDefaultLocale() Get the system default locale. | public ActionForm | getFormBean(ActionMapping mapping) Get the flow-scoped form bean member associated with the given ActionMapping. | FlowControllerHandlerContext | getHandlerContext() | protected Locale | getLocale(HttpServletRequest request) Return the user's currently selected Locale.
Parameters: request - the current request. | protected Locale | getLocale() Get the user's currently selected Locale. | final protected ActionMapping | getMapping() Get the current Struts ActionMapping, which is information from the Struts-XML <action>
tag that corresponds to the current action being executed. | protected MessageResources | getMessageResources() Get the default message resources for this FlowController. | protected MessageResources | getMessageResources(String key) Get the specified message resources for this FlowController. | final protected ModuleConfig | getModuleConfig() Get the Struts ModuleConfig object associated with this FlowController. | public ModuleConfig | getModuleConfig(ServletContext servletContext, HttpServletRequest request) Gets the Struts module configuration associated with this controller.
FlowController.getModuleConfig() Parameters: servletContext - the current ServletContext. | abstract public String | getModulePath() Get the Struts module path for this controller. | abstract public PreviousPageInfo | getPreviousPageInfoLegacy(PageFlowController curJpf, HttpServletRequest request) Get a legacy PreviousPageInfo. | final protected HttpServletRequest | getRequest() Get the current HttpServletRequest. | PageFlowRequestProcessor | getRequestProcessor() | protected MessageResources | getResources() Return the message resources for the default module. | protected MessageResources | getResources(HttpServletRequest request) Return the default message resources for the current module. | protected MessageResources | getResources(HttpServletRequest request, String key) Return the specified message resources for the current module. | final protected HttpServletResponse | getResponse() Get the current HttpServletResponse. | public String | getRewrittenActionURI(String actionName, Map parameters, boolean asValidXml) Create a fully-rewritten URI given an action and parameters. | protected ActionServlet | getServlet() Get the current Struts ActionServlet. | final protected HttpSession | getSession() Get the current user session. | public Principal | getUserPrincipal() Get the current logged-in user. | public synchronized ActionForward | handleException(Throwable ex, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) Handle the given exception - invoke user code if appropriate and return a destination URI.
Parameters: ex - the Exception to handle. Parameters: mapping - the Struts action mapping for current Struts action being processed. Parameters: form - the form-bean (if any) associated with the Struts action being processed. | boolean | incrementRequestCount(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) Increment the count of concurrent requests to this FlowController. | protected ActionForward | internalExecute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) Internal method used to execute an action on a FlowController. | protected ActionForward | invokeActionMethod(Method method, Object arg) Invoke the given action handler method, passing it an argument if appropriate.
Parameters: method - the action handler method to invoke. Parameters: arg - the form-bean to pass; may be null . | ActionForward | invokeActionMethod(Method method, Object arg, HttpServletRequest request, ActionMapping mapping) Invoke the given action handler method, passing it an argument if appropriate.
Parameters: method - the action handler method to invoke. Parameters: arg - the form-bean to pass; may be null . Parameters: request - the current HttpServletRequest. | public synchronized ActionForward | invokeExceptionHandler(Method method, Throwable ex, String message, ActionForm wrappedFormBean, PageFlowExceptionConfig exceptionConfig, ActionMapping actionMapping, HttpServletRequest request, HttpServletResponse response) Invoke the given exception handler method. | public boolean | isAction(String name) Tell whether a given String is the name of an action handled by a method in this PageFlowController.
Parameters: name - the action-name to query. | protected boolean | isCancelled(HttpServletRequest request) Returns true if the current form's cancel button was
pressed. | public boolean | isPageFlow() Tell whether this is a
PageFlowController . | protected boolean | isTokenValid(HttpServletRequest request) Return true if there is a transaction token stored in
the user's current session, and the value submitted as a request
parameter with this action matches it. | protected boolean | isTokenValid() Return true if there is a transaction token stored in
the user's current session, and the value submitted as a request
parameter with this action matches it. | protected boolean | isTokenValid(HttpServletRequest request, boolean reset) Return true if there is a transaction token stored in
the user's current session, and the value submitted as a request
parameter with this action matches it. | protected boolean | isTokenValid(boolean reset) Return true if there is a transaction token stored in
the user's current session, and the value submitted as a request
parameter with this action matches it. | public boolean | isUserInRole(String roleName) Tell whether the current logged-in user is a member of a given role. | public void | login(String username, String password) Log in the user, using "weak" username/password authentication. | public void | logout(boolean invalidateSessions) Log out the current user. | public static ActionResult | lookup(String actionName, ServletContext context, HttpServletRequest request, HttpServletResponse response) Resolve the given action name to a URI. | public static ActionResult | lookup(String actionName, ServletContext context, HttpServletRequest request, HttpServletResponse response, String actionServletClassName) Resolve the given action name to a URI.
Note: this method invokes the full action-processing cycle on a
ScopedRequest . | protected void | onCreate() Callback that is invoked when this controller instance is created. | protected void | onDestroy() Callback that is invoked when this controller instance is "destroyed", i.e., removed from the user session. | protected void | onDestroy(HttpSession session) Callback that is invoked when this controller instance is "destroyed", i.e., removed from the user session. | protected void | onRefresh() Callback that is invoked when this controller is involved in a refresh request, as can happen in a portal
environment on a request where no action is run in the current page flow, but a previously-displayed page in the
page flow is re-rendered. | final public synchronized void | refresh(HttpServletRequest request, HttpServletResponse response) Called on this object for non-lookup (refresh) requests. | public void | reinitialize(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) Reinitialize the object for a new request. | protected void | remove() Remove this instance from the user session. | protected void | resetToken(HttpServletRequest request) Reset the saved transaction token in the user's session. | protected void | resetToken() Reset the saved transaction token in the user's session. | public String | resolveAction(String actionName, Object form, HttpServletRequest request, HttpServletResponse response) Call an action and return the result URI.
Parameters: actionName - the name of the action to run. Parameters: form - the form bean instance to pass to the action, or null if none should be passed. | public String | resolveAction(String actionName, Object form) Call an action and return the result URI.
FlowController.resolveAction(StringObjectHttpServletRequestHttpServletResponse) Parameters: actionName - the name of the action to run. Parameters: form - the form bean instance to pass to the action, or null if none should be passed. | public static Locale | retrieveUserLocale(HttpServletRequest request, String locale) | protected void | saveActionErrors(ActionMessages errors) Save the specified messages keys into the request for use by the <netui:error> or <netui:errors> tags. | protected void | saveErrors(HttpServletRequest request, ActionMessages errors) Save the specified messages keys into the request for use by the <netui:error> or <netui:errors> tags. | protected void | saveMessages(HttpServletRequest request, ActionMessages messages) Save the specified messages keys into the appropriate request
attribute for use by the Struts <html:messages> tag (if
messages="true" is set), if any messages are required. | void | savePreviousActionInfo(ActionForm form, HttpServletRequest request, ActionMapping mapping, ServletContext servletContext) Used by derived classes to store information on the most recent action executed. | public void | savePreviousPageInfo(ActionForward forward, ActionForm form, ActionMapping mapping, HttpServletRequest request, ServletContext servletContext, boolean isSpecialForward) Store information about recent pages displayed. | protected void | saveToken(HttpServletRequest request) Save a new transaction token in the user's current session, creating
a new session if necessary. | protected void | sendError(String errText, HttpServletResponse response) Send a Page Flow error to the browser. | protected void | sendError(String errText, HttpServletRequest request, HttpServletResponse response) Send a Page Flow error to the browser. | protected void | setLocale(HttpServletRequest request, Locale locale) Set the user's currently selected Locale. | protected void | setLocale(Locale locale) Set the user's currently selected Locale. | PerRequestState | setPerRequestState(PerRequestState state) | final public ModuleConfig | theModuleConfig() This is a non-property public accessor that will return the property value moduleConfig . |
FlowController | protected FlowController()(Code) | | Default constructor.
|
addActionError | protected void addActionError(String propertyName, String messageKey, Object[] messageArgs)(Code) | | Add a property-related message that will be shown with the Errors and Error tags.
Parameters: propertyName - the name of the property with which to associate this error. Parameters: messageKey - the message-resources key for the message. Parameters: messageArgs - zero or more arguments to the message. |
addActionErrorExpression | protected void addActionErrorExpression(String propertyName, String expression, Object[] messageArgs)(Code) | | Add a property-related message as an expression that will be evaluated and shown with the Errors and Error tags.
Parameters: propertyName - the name of the property with which to associate this error. Parameters: expression - the expression that will be evaluated to generate the error message. Parameters: messageArgs - zero or more arguments to the message; may be expressions. |
addValidationError | protected void addValidationError(String propertyName, String messageKey, Object[] messageArgs)(Code) | | Add a validation error that will be shown with the Errors and Error tags.
FlowController.addActionError Parameters: propertyName - the name of the property with which to associate this error. Parameters: messageKey - the message-resources key for the error message. Parameters: messageArgs - an array of arguments for the error message. |
addValidationError | protected void addValidationError(String propertyName, String messageKey)(Code) | | Add a validation error that will be shown with the Errors and Error tags.
FlowController.addActionError Parameters: propertyName - the name of the property with which to associate this error. Parameters: messageKey - the message-resources key for the error message. |
alwaysTrackPreviousAction | protected boolean alwaysTrackPreviousAction()(Code) | | When this FlowController does not use a
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation with a
navigateTo=
org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo.previousAction Jpf.NavigateTo.previousAction attribute, the following methods always return null by default.
- getPreviousActionInfo
- getPreviousActionURI
- getPreviousForm
Override alwaysTrackPreviousAction (which always returns false ) to enable these methods
in all cases.
true if the previous action should always be tracked, regardless of whetherreturn-to="previousAction" is used. See Also: PageFlowController.getPreviousActionInfo See Also: PageFlowController.getPreviousActionURI See Also: PageFlowController.getPreviousFormBean |
alwaysTrackPreviousPage | protected boolean alwaysTrackPreviousPage()(Code) | | When this FlowController does not use a
org.apache.beehive.netui.pageflow.annotations.Jpf.Forward @Jpf.Forward annotation with either a
navigateTo =
org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo.currentPage Jpf.NavigateTo.currentPage attribute or a
navigateTo =
org.apache.beehive.netui.pageflow.annotations.Jpf.NavigateTo.previousPage Jpf.NavigateTo.previousPage attribute, the following methods always return null by default.
- getCurrentPageInfo
- getPreviousPageInfo
- getCurrentForwardPath
- getPreviousForwardPath
Override alwaysTrackPreviousPage (which always returns false ) to enable these methods
in all cases.
true if the previous page should always be tracked, regardlessof whether return-to="currentPage" or return-to="previousPage" is used. See Also: PageFlowController.getCurrentPageInfo See Also: PageFlowController.getPreviousPageInfo See Also: PageFlowController.getCurrentForwardPath See Also: PageFlowController.getPreviousForwardPath |
destroy | void destroy(HttpSession session)(Code) | | Internal destroy method that is invoked when this object is being removed from the session. This is a
framework-invoked method; it should not normally be called directly.
|
execute | public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code) | | Perform decision logic to determine the next URI to be displayed.
Parameters: mapping - the Struts ActionMapping for the current action being processed. Parameters: form - the form-bean (if any) associated with the Struts action being processed. May be null. Parameters: request - the current HttpServletRequest. Parameters: response - the current HttpServletResponse. a Struts ActionForward object that specifies the next URI to be displayed. throws: Exception - if an Exception was thrown during user action-handling code. |
getActionMethod | protected Method getActionMethod(String methodName, Class argType)(Code) | | Get an action handler method of the given name/signature.
Parameters: methodName - the name of the action handler method to query. Parameters: argType - the type of the argument to the action handler method; if null ,the method takes no arguments. the desired Method, or null if it doesn't exist. |
getActionMethodForward | ActionForward getActionMethodForward(String actionName, Object inputForm, HttpServletRequest request, HttpServletResponse response, ActionMapping mapping) throws Exception(Code) | | Get the ActionForward returned by the action handler method that corresponds to the
given action name and form-bean, or send an error to the browser if there is no
matching method.
Parameters: actionName - the name of the Struts action to handle. Parameters: inputForm - the form-bean associated with the action. May be null . Parameters: response - the current HttpServletResponse. the ActionForward returned by the action handler method, or null ifthere was no matching method (in which case an error was written to thebrowser. throws: Exception - if an Exception was raised in user code. |
getActions | protected String[] getActions()(Code) | | Get a list of the names of actions handled by methods in this PageFlowController.
a String array containing the names of actions handled by methods in this PageFlowController. |
getDataSource | protected DataSource getDataSource(HttpServletRequest request)(Code) | | Return the default data source for the Struts module associated with this FlowController.
Parameters: request - the current request. |
getDataSource | protected DataSource getDataSource(HttpServletRequest request, String key)(Code) | | Return the specified data source for the current Struts module.
Parameters: request - The servlet request we are processing Parameters: key - The key specified in the<message-resources> element for therequested bundle |
getDefaultLocale | protected static Locale getDefaultLocale()(Code) | | Get the system default locale.
the system default locale. |
getFormBean | public ActionForm getFormBean(ActionMapping mapping)(Code) | | Get the flow-scoped form bean member associated with the given ActionMapping. This is a framework-invoked
method that should not normally be called directly.
|
getLocale | protected Locale getLocale()(Code) | | Get the user's currently selected Locale.
the user's currently selected Locale, stored in the session. |
getMessageResources | protected MessageResources getMessageResources()(Code) | | Get the default message resources for this FlowController.
|
getMessageResources | protected MessageResources getMessageResources(String key)(Code) | | Get the specified message resources for this FlowController.
Parameters: key - The bundle key specified in aorg.apache.beehive.netui.pageflow.annotations.Jpf.MessageBundle @Jpf.MessageBundle annotation. |
getModuleConfig | final protected ModuleConfig getModuleConfig()(Code) | | Get the Struts ModuleConfig object associated with this FlowController.
|
getModulePath | abstract public String getModulePath()(Code) | | Get the Struts module path for this controller.
a String that is the Struts module path for this controller. |
getResources | protected MessageResources getResources(HttpServletRequest request, String key)(Code) | | Return the specified message resources for the current module.
FlowController.getMessageResources(String) Parameters: request - the current request. Parameters: key - The bundle key specified in aorg.apache.beehive.netui.pageflow.annotations.Jpf.MessageBundle @Jpf.MessageBundle annotation. |
getRewrittenActionURI | public String getRewrittenActionURI(String actionName, Map parameters, boolean asValidXml) throws URISyntaxException(Code) | | Create a fully-rewritten URI given an action and parameters.
Parameters: actionName - the action name to convert into a fully-rewritten URI; may be qualified with a path from thewebapp root, in which case the parent directory from the current request is not used. Parameters: parameters - the additional parameters to include in the URI query. Parameters: asValidXml - flag indicating that the query of the uri should be writtenusing the "&" entity, rather than the character, '&' a fully-rewritten URI for the given action. throws: URISyntaxException - if there is a problem converting the action url (derivedfrom processing the given action name) into a URI. throws: IllegalStateException - if this method is invoked outside of action methodexecution (i.e., outside of the call to FlowController.execute,and outside of FlowController.onCreate,FlowController.beforeAction, FlowController.afterAction. |
getUserPrincipal | public Principal getUserPrincipal()(Code) | | Get the current logged-in user. Goes through a custom
LoginHandler , if one has been configured in
beehive-netui-config.xml.
the current logged-in Principal , or null if there is no logged-in user. |
handleException | public synchronized ActionForward handleException(Throwable ex, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code) | | Handle the given exception - invoke user code if appropriate and return a destination URI.
Parameters: ex - the Exception to handle. Parameters: mapping - the Struts action mapping for current Struts action being processed. Parameters: form - the form-bean (if any) associated with the Struts action being processed. May be null. Parameters: request - the current HttpServletRequest. Parameters: response - the current HttpServletResponse. a Struts ActionForward object that specifies the URI that should be displayed. throws: ServletException - if another Exception is thrown during handling of ex . |
incrementRequestCount | boolean incrementRequestCount(HttpServletRequest request, HttpServletResponse response, ServletContext servletContext) throws IOException(Code) | | Increment the count of concurrent requests to this FlowController. Note that this method
is not synchronized -- we use it to decide whether to synchronize on this instance,
or to bail out with an error message about too many concurrent requests.
|
invokeActionMethod | protected ActionForward invokeActionMethod(Method method, Object arg) throws Exception(Code) | | Invoke the given action handler method, passing it an argument if appropriate.
Parameters: method - the action handler method to invoke. Parameters: arg - the form-bean to pass; may be null . the ActionForward returned by the action handler method. throws: Exception - if an Exception was raised in user code. |
invokeActionMethod | ActionForward invokeActionMethod(Method method, Object arg, HttpServletRequest request, ActionMapping mapping) throws Exception(Code) | | Invoke the given action handler method, passing it an argument if appropriate.
Parameters: method - the action handler method to invoke. Parameters: arg - the form-bean to pass; may be null . Parameters: request - the current HttpServletRequest. the ActionForward returned by the action handler method. throws: Exception - if an Exception was raised in user code. |
invokeExceptionHandler | public synchronized ActionForward invokeExceptionHandler(Method method, Throwable ex, String message, ActionForm wrappedFormBean, PageFlowExceptionConfig exceptionConfig, ActionMapping actionMapping, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code) | | Invoke the given exception handler method. This is a framework-invoked method that should not normally be called
directly
Parameters: method - the action handler method to invoke. Parameters: ex - the Throwable that is to be handled. Parameters: message - the String message that is to be passed to the handler method. Parameters: wrappedFormBean - the wrapped form bean that is associated with the action being processed; may be null . Parameters: exceptionConfig - the exception configuration object for the current exception handler. Parameters: actionMapping - the action configuration object for the requested action. Parameters: request - the current HttpServletRequest. Parameters: response - the current HttpServletResponse. the ActionForward returned by the exception handler method. |
isAction | public boolean isAction(String name)(Code) | | Tell whether a given String is the name of an action handled by a method in this PageFlowController.
Parameters: name - the action-name to query. true if name is the name of an action handled by a method in thisPageFlowController. |
isCancelled | protected boolean isCancelled(HttpServletRequest request)(Code) | | Returns true if the current form's cancel button was
pressed. This method will check if the Globals.CANCEL_KEY
request attribute has been set, which normally occurs if the cancel
button generated by the Struts CancelTag was pressed by the user
in the current request. If true , validation performed
by an ActionForm's validate() method
will have been skipped by the controller servlet.
org.apache.beehive.netui.tags.html.Button Parameters: request - The servlet request we are processing See Also: org.apache.struts.taglib.html.CancelTag |
isTokenValid | protected boolean isTokenValid(HttpServletRequest request)(Code) | | Return true if there is a transaction token stored in
the user's current session, and the value submitted as a request
parameter with this action matches it. Returns false
under any of the following circumstances:
- No session associated with this request
- No transaction token saved in the session
- No transaction token included as a request parameter
- The included transaction token value does not match the
transaction token in the user's session
FlowController.isTokenValid() Parameters: request - The servlet request we are processing |
isTokenValid | protected boolean isTokenValid()(Code) | | Return true if there is a transaction token stored in
the user's current session, and the value submitted as a request
parameter with this action matches it. Returns false
under any of the following circumstances:
- No session associated with this request
- No transaction token saved in the session
- No transaction token included as a request parameter
- The included transaction token value does not match the
transaction token in the user's session
See Also: FlowController.generateToken() See Also: FlowController.resetToken() |
isTokenValid | protected boolean isTokenValid(HttpServletRequest request, boolean reset)(Code) | | Return true if there is a transaction token stored in
the user's current session, and the value submitted as a request
parameter with this action matches it. Returns false
- No session associated with this request
- No transaction token saved in the session
- No transaction token included as a request parameter
- The included transaction token value does not match the
transaction token in the user's session
FlowController.isTokenValid(boolean) Parameters: request - The servlet request we are processing Parameters: reset - Should we reset the token after checking it? |
isTokenValid | protected boolean isTokenValid(boolean reset)(Code) | | Return true if there is a transaction token stored in
the user's current session, and the value submitted as a request
parameter with this action matches it. Returns false
- No session associated with this request
- No transaction token saved in the session
- No transaction token included as a request parameter
- The included transaction token value does not match the
transaction token in the user's session
Parameters: reset - Should we reset the token after checking it? See Also: FlowController.generateToken() See Also: FlowController.resetToken() |
isUserInRole | public boolean isUserInRole(String roleName)(Code) | | Tell whether the current logged-in user is a member of a given role. Goes through a custom
LoginHandler ,
if one has been configured in beehive-netui-config.xml.
Parameters: roleName - the name of the role to test. true if there is a current logged-in user and the user is a member of the given role. See Also: FlowController.getUserPrincipal |
login | public void login(String username, String password) throws LoginException(Code) | | Log in the user, using "weak" username/password authentication. Goes through a custom
LoginHandler , if
one has been configured in beehive-netui-config.xml.
Parameters: username - the user's login name Parameters: password - the user's password exception: LoginException - if the authentication failed |
logout | public void logout(boolean invalidateSessions)(Code) | | Log out the current user. Goes through a custom
LoginHandler , if one has been configured in
beehive-netui-config.xml.
Parameters: invalidateSessions - if true, the session is invalidated (on all single-signon webapps); otherwise the session and its data are left intact (except for authenticationinformation used internally by the server). To invalidate the session in only thecurrent webapp, set this parameter to false and callFlowController.getSession.invalidate(). |
onDestroy | protected void onDestroy(HttpSession session)(Code) | | Callback that is invoked when this controller instance is "destroyed", i.e., removed from the user session.
FlowController.getRequest ,
FlowController.getResponse , and
FlowController.getActionMapping may not be used during this method, since it may be called due to session termination outside of a
request.
FlowController.getSession also may not be used, but the session is passed as an argument.
Note that this method is not synchronized. It is dangerous to synchronize your override of
this method because it is invoked during a callback from the Servlet container. Depending on the container,
synchronization here can cause deadlocks.
|
onRefresh | protected void onRefresh()(Code) | | Callback that is invoked when this controller is involved in a refresh request, as can happen in a portal
environment on a request where no action is run in the current page flow, but a previously-displayed page in the
page flow is re-rendered.
|
refresh | final public synchronized void refresh(HttpServletRequest request, HttpServletResponse response)(Code) | | Called on this object for non-lookup (refresh) requests. This is a framework-invoked method that should not
normally be called directly.
|
remove | protected void remove()(Code) | | Remove this instance from the user session.
|
resetToken | protected void resetToken(HttpServletRequest request)(Code) | | Reset the saved transaction token in the user's session. This
indicates that transactional token checking will not be needed
on the next request that is submitted.
FlowController.resetToken() Parameters: request - The servlet request we are processing |
resolveAction | public String resolveAction(String actionName, Object form, HttpServletRequest request, HttpServletResponse response) throws Exception(Code) | | Call an action and return the result URI.
Parameters: actionName - the name of the action to run. Parameters: form - the form bean instance to pass to the action, or null if none should be passed. the result webapp-relative URI, as a String. throws: ActionNotFoundException - when the given action does not exist in this FlowController. throws: Exception - if the action method throws an Exception. |
saveActionErrors | protected void saveActionErrors(ActionMessages errors)(Code) | | Save the specified messages keys into the request for use by the <netui:error> or <netui:errors> tags.
Parameters: errors - the ActionMessages to save in the request. |
saveErrors | protected void saveErrors(HttpServletRequest request, ActionMessages errors)(Code) | | Save the specified messages keys into the request for use by the <netui:error> or <netui:errors> tags.
FlowController.saveActionErrors Parameters: errors - the ActionMessages to save in the request. |
saveMessages | protected void saveMessages(HttpServletRequest request, ActionMessages messages)(Code) | | Save the specified messages keys into the appropriate request
attribute for use by the Struts <html:messages> tag (if
messages="true" is set), if any messages are required. Otherwise,
ensure that the request attribute is not created.
Parameters: request - The servlet request we are processing Parameters: messages - Messages object |
savePreviousActionInfo | void savePreviousActionInfo(ActionForm form, HttpServletRequest request, ActionMapping mapping, ServletContext servletContext)(Code) | | Used by derived classes to store information on the most recent action executed.
|
savePreviousPageInfo | public void savePreviousPageInfo(ActionForward forward, ActionForm form, ActionMapping mapping, HttpServletRequest request, ServletContext servletContext, boolean isSpecialForward)(Code) | | Store information about recent pages displayed. This is a framework-invoked method that should not normally be
called directly.
|
saveToken | protected void saveToken(HttpServletRequest request)(Code) | | Save a new transaction token in the user's current session, creating
a new session if necessary.
Parameters: request - The servlet request we are processing |
setLocale | protected void setLocale(HttpServletRequest request, Locale locale)(Code) | | Set the user's currently selected Locale.
Parameters: request - The request we are processing Parameters: locale - The user's selected Locale to be set, or nullto select the server's default LocaleFlowController.setLocale(Locale) |
setLocale | protected void setLocale(Locale locale)(Code) | | Set the user's currently selected Locale.
Parameters: locale - The user's selected Locale to be set, or null to select the server's default Locale |
setPerRequestState | PerRequestState setPerRequestState(PerRequestState state)(Code) | | |
theModuleConfig | final public ModuleConfig theModuleConfig()(Code) | | This is a non-property public accessor that will return the property value moduleConfig .
This is a non-property method because properties are exposed to databinding and that would expose
internal data structures to attack.
the ModuleConfig for this FlowController |
|
|