Class HelpAction
java.lang.Object
org.apache.struts2.ActionSupport
org.conical.common.bbl.web.struts.actions.BaseAction
org.conical.common.bbl.web.struts.actions.HelpAction
- All Implemented Interfaces:
Serializable, org.apache.struts2.action.Action, org.apache.struts2.action.ServletRequestAware, org.apache.struts2.action.ServletResponseAware, org.apache.struts2.interceptor.ValidationAware, org.apache.struts2.locale.LocaleProvider, org.apache.struts2.text.TextProvider, org.apache.struts2.Validateable
This action should be referred to when a user help button or link is clicked. It takes
one parameter, "page", which is the page for which help is desired. The action looks
this page up in the help.properties file to find the resource containing helpful
information about that specific page. If no mapping or no page exists, the action
provides sensible text.
- Author:
- rdoherty
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class BaseAction
BaseAction.DeveloperModifier and TypeClassDescriptionclassEncapsulates information about the contact developer for this application -
Field Summary
Fields inherited from class BaseAction
PERMISSION_DENIEDModifier and TypeFieldDescriptionprotected static final StringShould be returned when permission to view a page or perform an action is deniedFields inherited from class org.apache.struts2.ActionSupport
containerFields inherited from interface org.apache.struts2.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class BaseAction
addCookie, doAutoLogin, execute, getApplicationName, getApplicationProperties, getCookies, getCurrentUser, getDeveloper, getEthnicities, getHandednesses, getNameSuffixes, getRaces, getReligions, getRequestUrl, getRequiredAccessRoles, getSession, getSexes, getSexualOrientations, getStates, withServletRequest, withServletResponseModifier and TypeMethodDescriptionvoidaddCookie(jakarta.servlet.http.Cookie cookie) Adds the passed cookie to the HTTP responseprotected voidTry to log in user automatically using cookies or some other mechanism (implementation dependent).final Stringexecute()Method called by Struts to initiate action logic.Returns the name of this applicationReturns a map of application properties read from the application.properties file.List<jakarta.servlet.http.Cookie> final UserReturns the user currently logged into this application, or null if no one is logged in, if the user is no longer valid, or if an error occurs (the error having been logged).Returns the developer who should be contacted regarding this applicationgetRaces()Returns the original URL for this request.Returns the set of access roles required to execute this action (and access the associated page).Exposes session to child classes.getSexes()voidwithServletRequest(jakarta.servlet.http.HttpServletRequest request) voidwithServletResponse(jakarta.servlet.http.HttpServletResponse response) Methods inherited from class org.apache.struts2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocale, getLocaleProvider, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocale, validate
-
Constructor Details
-
HelpAction
public HelpAction()
-
-
Method Details
-
actionRequiresLogin
protected boolean actionRequiresLogin()For security purposes, help pages are access-protected.- Specified by:
actionRequiresLoginin classBaseAction- Returns:
- true
-
doWork
Processes page argument and attempts to find help text for the given page. Sets helpPageText accordingly.- Specified by:
doWorkin classBaseAction- Returns:
- success (should always provide some sort of text even if parameter is missing or bad)
- Throws:
Exception- if IO or other error occurs
-
setPage
Sets the page caller requires help with- Parameters:
referringPage- page about which help is desired
-
getHelpPageText
-