|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--org.apache.struts.action.Action
|
+--uk.ac.ebi.intact.application.editor.struts.framework.AbstractEditorAction
Super class for all Editor related action classes.
| Field Summary | |
static java.lang.String |
EDITOR_ERROR
The global Intact error key. |
protected static org.apache.log4j.Logger |
LOGGER
The logger for Editor. |
| Fields inherited from class org.apache.struts.action.Action |
ACTION_SERVLET_KEY, APPLICATION_KEY, DATA_SOURCE_KEY, defaultLocale, ERROR_KEY, EXCEPTION_KEY, FORM_BEANS_KEY, FORWARDS_KEY, LOCALE_KEY, MAPPING_KEY, MAPPINGS_KEY, MESSAGE_KEY, MESSAGES_KEY, MULTIPART_KEY, PLUG_INS_KEY, REQUEST_PROCESSOR_KEY, servlet, SERVLET_KEY, TRANSACTION_TOKEN_KEY |
| Fields inherited from interface uk.ac.ebi.intact.application.editor.struts.framework.util.ForwardConstants |
EXP, FAILURE, MATCH, NO_MATCH, RESULT, SEARCH, SUCCESS |
| Constructor Summary | |
AbstractEditorAction()
|
|
| Method Summary | |
protected EditUserI |
getIntactUser(javax.servlet.http.HttpServletRequest request)
Returns the Intact User instance saved in a session for given Http request. |
protected EditUserI |
getIntactUser(javax.servlet.http.HttpSession session)
Returns the Intact User instance saved in a session. |
protected EditorService |
getService()
Returns the only instance of Intact Service instance. |
protected javax.servlet.http.HttpSession |
getSession(javax.servlet.http.HttpServletRequest request)
Returns the session from given request. |
protected boolean |
hasErrors(javax.servlet.http.HttpServletRequest request)
Returns true if errors in stored in the request |
protected boolean |
isPropertyEmpty(org.apache.struts.action.DynaActionForm form,
java.lang.String name)
Returns true if given property is empty. |
static boolean |
isPropertyEmpty(java.lang.String value)
Returns true if given value is empty. |
protected boolean |
isPropertyNull(org.apache.struts.action.DynaActionForm form,
java.lang.String name)
Returns true if the property for given name is null. |
protected boolean |
isPropertyNullOrEmpty(org.apache.struts.action.DynaActionForm form,
java.lang.String name)
Returns true if the property for given name is empty. |
protected void |
removeFormBean(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
Removes the obsolete form bean. |
protected boolean |
returnToExperiment(javax.servlet.http.HttpServletRequest request)
Returns true if the next forward action is back to the experiment editor. |
protected void |
setDestinationExperiment(javax.servlet.http.HttpServletRequest request)
Sets the destination experiment to edit. |
| Methods inherited from class org.apache.struts.action.Action |
execute, execute, generateToken, getDataSource, getDataSource, getLocale, getResources, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, perform, perform, resetToken, saveErrors, saveMessages, saveToken, setLocale, setServlet, toHex |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String EDITOR_ERROR
protected static final org.apache.log4j.Logger LOGGER
| Constructor Detail |
public AbstractEditorAction()
| Method Detail |
public static boolean isPropertyEmpty(java.lang.String value)
value - the value to check for empty.
value is empty; any excess spaces
are removed before checking for empty.protected EditorService getService()
EditorService class.
protected EditUserI getIntactUser(javax.servlet.http.HttpServletRequest request)
throws SessionExpiredException
request - the Http request to access the Intact user object.
EditUser stored in a session.
No new session is created.
SessionExpiredException - for an expired session.
post: return <> Undefined
protected EditUserI getIntactUser(javax.servlet.http.HttpSession session)
throws SessionExpiredException
session - the session to access the Intact user object.
EditUser stored in
session
SessionExpiredException - for an expired session.
post: return <> Undefined
protected javax.servlet.http.HttpSession getSession(javax.servlet.http.HttpServletRequest request)
throws SessionExpiredException
request - the request to get the session from.
SessionExpiredException - for an expired session.
post: return <> Undefined
protected void removeFormBean(org.apache.struts.action.ActionMapping mapping,
javax.servlet.http.HttpServletRequest request)
mapping - the ActionMapping used to select this instance.request - the HTTP request we are processing.protected boolean hasErrors(javax.servlet.http.HttpServletRequest request)
request - Http request to search errors for.
request and
it is not null. For all instances, false is returned.
protected boolean isPropertyNullOrEmpty(org.apache.struts.action.DynaActionForm form,
java.lang.String name)
form - the form to check.name - the name of the property to check.
name is empty in form.
pre: form.get(name).class.getName() == java.lang.String
protected boolean isPropertyNull(org.apache.struts.action.DynaActionForm form,
java.lang.String name)
form - the form to check.name - the name of the property to check.
name is null in form.
protected boolean isPropertyEmpty(org.apache.struts.action.DynaActionForm form,
java.lang.String name)
form - the form to check.name - the name of the property; the value stored under this property
must be a String type.
name is empty; any excess spaces
are removed before checking for empty.
protected boolean returnToExperiment(javax.servlet.http.HttpServletRequest request)
throws SessionExpiredException
request - the Http request to access the user.
SessionExpiredException - if the session is expired.
protected void setDestinationExperiment(javax.servlet.http.HttpServletRequest request)
throws SessionExpiredException,
SearchException
returnToExperiment(HttpServletRequest) must be true.
request - the Http request to access the user.
SessionExpiredException - if the session is expired.
SearchException - unable to access the experiment to go back to.
pre: returnToExperiment(request) == true
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||