|
|||||||||||
| 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.hierarchView.struts.framework.IntactBaseAction
Super class for all hierarchView related action classes.
| Field Summary | |
static java.lang.String |
INTACT_ERROR
The global Intact error key. |
static java.lang.String |
INTACT_MESSAGE
The global Intact message key. |
static org.apache.log4j.Logger |
logger
|
| 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 |
| Constructor Summary | |
IntactBaseAction()
|
|
| Method Summary | |
protected void |
addError(java.lang.String key)
Adds an error with given key. |
protected void |
addError(java.lang.String key,
java.lang.String value)
Adds an error with given key and value. |
protected void |
addMessage(java.lang.String key)
Adds an Message with given key. |
protected void |
addMessage(java.lang.String key,
java.lang.String value)
Adds an Message with given key and value. |
protected void |
clearErrors()
Clear error container. |
protected void |
clearMessages()
Clear Message container. |
protected IntactUser |
createIntactUser(javax.servlet.http.HttpSession session,
javax.servlet.http.HttpServletRequest aRequest)
Create a new IntactUser and store it in the session. A datasource is also initialised inside the IntactUser. |
protected IntactUserI |
getIntactUser(javax.servlet.http.HttpSession session)
Returns the Intact User instance saved in a session. |
protected javax.servlet.http.HttpSession |
getNewSession(javax.servlet.http.HttpServletRequest request)
Returns a session and create a new one if necessary. |
protected javax.servlet.http.HttpSession |
getSession(javax.servlet.http.HttpServletRequest request)
Returns the session from given request. |
protected boolean |
intactUserExists(javax.servlet.http.HttpSession session)
Says if an IntactUser object is currently available in the session. |
protected boolean |
isErrorsEmpty()
Specify if an the error set is empty. |
protected boolean |
isMessagesEmpty()
Specify if an the Message set is empty. |
protected void |
produceImage(IntactUserI user)
Produces image accordingly to the interaction network stored in the user : Any errors are stored in the ActionErrors object. |
protected void |
saveErrors(javax.servlet.http.HttpServletRequest request)
Saves the errors in given request for |
protected void |
saveMessages(javax.servlet.http.HttpServletRequest request)
Saves the Messages in given request for |
void |
updateInteractionNetwork(IntactUserI user,
int action)
Update the interaction network according to the specified action type: StrutsConstants.CREATE_INTERACTION_NETWORK : create a new interaction network
StrutsConstants.ADD_INTERACTION_NETWORK : add a new interaction network to the existing's one
StrutsConstants.UPDATE_INTERACTION_NETWORK : rebuild the current interaction network by taking into account any depth change
Any errors are stored in the ActionErrors object. |
| 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 org.apache.log4j.Logger logger
public static final java.lang.String INTACT_ERROR
public static final java.lang.String INTACT_MESSAGE
| Constructor Detail |
public IntactBaseAction()
| Method Detail |
protected boolean intactUserExists(javax.servlet.http.HttpSession session)
session - the session to look into.
protected IntactUserI getIntactUser(javax.servlet.http.HttpSession session)
throws SessionExpiredException
session - the session to access the Intact user object.
IntactUserImpl stored in
session
SessionExpiredException
protected javax.servlet.http.HttpSession getSession(javax.servlet.http.HttpServletRequest request)
throws SessionExpiredException
request - the request to get the session from.
request.
SessionExpiredExceptionprotected javax.servlet.http.HttpSession getNewSession(javax.servlet.http.HttpServletRequest request)
request - the request to get the session from.
protected void clearErrors()
protected void addError(java.lang.String key)
key - the error key. This value is looked up in the
IntactResources.properties bundle.
protected void addError(java.lang.String key,
java.lang.String value)
key - the error key. This value is looked up in the
IntactResources.properties bundle.value - the value to substitute for the first place holder in the
IntactResources.properties bundle.protected void saveErrors(javax.servlet.http.HttpServletRequest request)
request - the request to save errors.protected boolean isErrorsEmpty()
protected void clearMessages()
protected void addMessage(java.lang.String key)
key - the Message key. This value is looked up in the
Struts.properties bundle.
protected void addMessage(java.lang.String key,
java.lang.String value)
key - the Message key. This value is looked up in the
Struts.properties bundle.value - the value to substitute for the first place holder in the
Struts.properties bundle.protected void saveMessages(javax.servlet.http.HttpServletRequest request)
request - the request to save errors.protected boolean isMessagesEmpty()
protected IntactUser createIntactUser(javax.servlet.http.HttpSession session,
javax.servlet.http.HttpServletRequest aRequest)
session - the user session where to store the IntactUser
protected void produceImage(IntactUserI user)
user - where are saved produced data
public void updateInteractionNetwork(IntactUserI user,
int action)
throws MultipleResultException
Any errors are stored in the ActionErrors object. A test need to be done afterward to check if any errors have occured.StrutsConstants.CREATE_INTERACTION_NETWORK: create a new interaction networkStrutsConstants.ADD_INTERACTION_NETWORK: add a new interaction network to the existing's oneStrutsConstants.UPDATE_INTERACTION_NETWORK: rebuild the current interaction network by taking into account any depth change
user - where are saved produced dataaction - to perform
MultipleResultException - in case your query gives multiple resultsStrutsConstants
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||