com.sri.emo.controller
Class NodeController

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by com.jcorporate.expresso.core.controller.Controller
          extended by com.jcorporate.expresso.core.controller.DBController
              extended by com.sri.common.controller.AbstractDBController
                  extended by com.sri.common.controller.AbstractComponentController
                      extended by com.sri.emo.controller.NodeController
All Implemented Interfaces:
ComponentServiceLocator, Serializable
Direct Known Subclasses:
AddNodeAction, NodeAction

public class NodeController
extends AbstractComponentController

Intermediate Controller Class that provides services common to editing nodes. Examples are embedding, etc.

Version:
1.0
Author:
Michael Rimov
See Also:
Serialized Form

Field Summary
static String PARAM_RETURN_URL
          Location of the return URL.
 
Fields inherited from class com.sri.common.controller.AbstractComponentController
REQUEST_CONTAINER
 
Fields inherited from class com.sri.common.controller.AbstractDBController
COLUMN, COMMON_FOOTER_HANDLER, COMMON_HEADER_HANDLER, DELIMIT, EDIT_GROUP_DISPLAY, EMBEDDED_MODE, FOOTER, MAX_CHARS_OUTPUT, MAX_TEXTAREA_LENGTH, MULTIPLE_TEXTAREA_NUM_LINES, ROW, ROW_BLOCK, SESSION_CONTAINER, SINGLE_TEXTAREA_NUM_LINES, TEXTAREA_NUM_COLS, WARNING_LIST
 
Fields inherited from class com.jcorporate.expresso.core.controller.DBController
CACHE_NAME
 
Fields inherited from class com.jcorporate.expresso.core.controller.Controller
CONTROLLER_PARAM_KEY, CTL_SUCC_CTL, CTL_SUCC_STATE, CTL_SUCC_TRAN, mLog, NEWSTATE_EXCEPTION_KEY, ORIGINAL_URL_KEY, REQUEST_KEY, RESPONSE_KEY, RETURN_TO_SENDER_TRAN, STATE_ERR_CTL, STATE_ERR_STATE, STATE_ERR_TRAN, STATE_PARAM_KEY, STATE_SUCC_CTL, STATE_SUCC_STATE, STATE_SUCC_TRAN
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
NodeController()
          Default constructor.
NodeController(Class schemaClass)
           
 
Method Summary
protected  void addReturnToSenderParameter(ExpressoRequest request, ExpressoResponse response, Transition transToModify)
          Adds the return to sender as a parameter in the response
protected  boolean propagateReturnToSenderParameter(ExpressoRequest request, ExpressoResponse response, Transition transToModify)
          Sets any previously set 'return to sender' URLS if they have been set.
protected  boolean redirectToSender(ServletControllerRequest request, String message)
          Detects if we are running in embedded mode and redirects to the sender based on the return url (if supplied).
 
Methods inherited from class com.sri.common.controller.AbstractComponentController
addStateHandler, initializeControllerContainer, locate, locator, newExpressoState, postPerform, prePerform
 
Methods inherited from class com.sri.common.controller.AbstractDBController
addEmbeddedParameter, addWarning, addWarningList, getActionForwarding, getCheckbox, getPermsTrans, getPrettyXML, getTextArea, getTextArea, getWarningList, isEmbeddedMode, isValidAndPopulated, outputXML, populateDBObject, stateAllowed, str, strTrunc, trimAllTextFields
 
Methods inherited from class com.jcorporate.expresso.core.controller.DBController
getString, isAllowed
 
Methods inherited from class com.jcorporate.expresso.core.controller.Controller
addFinalState, addPromptTransitions, addRegDomainParamtoSession, addRequestedURLtoSession, addState, addStatePairing, endTimer, execute, findControllerForm, generateToken, getActionForward, getControllerChainingTransition, getControllerSecurityTransition, getFinalState, getInitialState, getLogger, getParamValues, getRequestURL, getSchema, getSchemaHierarchy, getSchemaInstance, getSchemaStack, getState, getStates, getString, getString, getTitle, handleException, instantiate, isFinalState, isHandleState, isPromptState, isTokenValid, loadStateForm, newState, nextHandleState, nextPromptState, populateStateForm, postPerform, prePerform, previousPromptState, processRequestTransitions, processTransitions, redirectRequest, redirectRequest, remapFromExtension, resetToken, saveToken, setControllerChainingTransition, setControllerSecurityTransition, setCurrentState, setInitialState, setSchema, setSchema, setupDefaultValues, setupReturnToSender, setupSubclassLog, transition, transition, transition, unloadStateForm
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PARAM_RETURN_URL

public static final String PARAM_RETURN_URL
Location of the return URL.

See Also:
Constant Field Values
Constructor Detail

NodeController

public NodeController()
Default constructor.


NodeController

public NodeController(Class schemaClass)
Method Detail

addReturnToSenderParameter

protected void addReturnToSenderParameter(ExpressoRequest request,
                                          ExpressoResponse response,
                                          Transition transToModify)
                                   throws ControllerException
Adds the return to sender as a parameter in the response

Parameters:
request - ControllerRequest
response - ControllerResponse
transToModify - The Transition that is going to get the new parameter.
Throws:
ControllerException - upon error populating the transition.

propagateReturnToSenderParameter

protected boolean propagateReturnToSenderParameter(ExpressoRequest request,
                                                   ExpressoResponse response,
                                                   Transition transToModify)
                                            throws ControllerException
Sets any previously set 'return to sender' URLS if they have been set.

Parameters:
request - ControllerRequest
response - ControllerResponse
transToModify - Transition
Returns:
boolean true if we found a previous Return to sender url.
Throws:
ControllerException

redirectToSender

protected boolean redirectToSender(ServletControllerRequest request,
                                   String message)
                            throws ControllerException
Detects if we are running in embedded mode and redirects to the sender based on the return url (if supplied).

Parameters:
request - ServletControllerRequest
message - The Message to give to the user to acknowledge the save/update, etc.
Returns:
boolean if we do redirect to sender. Otherwise, continue on and do whatever you were going to do normally.
Throws:
ControllerException


Copyright © 2004-2006 Codeguild, Inc.. All Rights Reserved.