com.sri.emo.controller
Class NodeAction

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
                          extended by com.sri.emo.controller.NodeAction
All Implemented Interfaces:
ComponentServiceLocator, Serializable

public class NodeAction
extends NodeController

Handle Node manipulation.

Author:
larry hamel
See Also:
Serialized Form

Field Summary
static String ADD_GROUP
           
static String[][] ALL_SORTS
           
static String ARE_MULTIPLE_ITEMS
           
static String ASCENDING_FLAG
           
static String DESCENDING_FLAG
           
static String DO_ATTRIB_PICK
           
static String DO_CLONE_NODE
          Constant for access to state "Clone a Single Node"
static String DO_CLONE_TREE
          Constant for access to state "Clone a Tree Of Nodes"
static String DO_DELETE_NODE
          Constant for access to state "Delete Node"
static String DO_DELETE_ONE_ATTRIB
           
static String DO_EDIT_ATTRIB
          Constant for access to state "Save Node Attributes"
static String DO_EDIT_MORE_ATTRIB
           
static String DO_EDIT_ONE_ATTRIB
           
static String DO_ORPHAN_CLONE_NODE
           
static String DO_PICKLIST_NODE
          Constant for access to state "Save Picklist for nodes"
static String FILTER_SESSION_KEY
           
static String GROUP_SORT
           
static String GROUP_SORT_DESC
           
static String INDEX
           
static String KEYWORD_SORT
           
static String KEYWORD_SORT_DESC
           
static String LIST_ALL_TYPES
           
static String LIST_NODE
          Constant for access to state "List Nodes"
static String OMIT_TYPES
          setup code for list of node types to omit from a tree listing; use "|" to delimit items in one string.
static String OWNER_SORT
           
static String OWNER_SORT_DESC
           
static String PERMS_BLOCK
           
static String PICK_LIST_ITEM
          checkbox name
static String PROMPT_ADD_ATTRIB
           
static String PROMPT_ATTRIB_PICK
           
static String PROMPT_CLONE_NODE
          Constant for access to state "Prompt Clone Node"
static String PROMPT_CLONE_TREE
          Constant for access to state "Prompt Clone Node and its Parts"
static String PROMPT_DELETE_NODE
          Constant for access to state "Prompt Delete Node"
static String PROMPT_DELETE_NODE_TREE
          Constant for access to state "Prompt Delete A Node Tree"
static String PROMPT_EDIT_ATTRIB
          Constant for access to state "Prompt Edit Attribute"
static String PROMPT_EDIT_ONE_ATTRIB
           
static String PROMPT_EDIT_PERMS
           
static String PROMPT_PICKLIST_NODE
          Constant for access to state "Prompt Edit Picklist For Nodes"
static String RELATION_TARGET
           
static String REMOVE_GROUP
           
static String SIBLING_MARKER
          flavors for cloning
static String SORT_PARAM
           
static String TITLE_SORT
          sorting columns for lists
static String TITLE_SORT_DESC
           
static String TYPE_TRANS
           
static String VIEW_SINGLE_ATTRIBUTE
          Constant for access to state "View Single Attribute"
static String VIEW_TREE
          Constant for access to state "View Node as Tree"
 
Fields inherited from class com.sri.emo.controller.NodeController
PARAM_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
NodeAction()
           
 
Method Summary
static Block addPicklist(Part part, ExpressoRequest request, ExpressoResponse response, String nodeId)
           
static void checkEmbedded(ExpressoRequest request, Transition addTransition)
          add a parameter to any transition if we are embedded
protected  Block generatePageTransitions(ExpressoRequest request, RecordPaginator rp, int pageLimit)
          Generates the page transitions.
protected  Block getAttributeInputBlock(Attribute[] attribs, Part part, ExpressoRequest request, boolean readOnly)
          Utility to create an input block for a given attribute part.
static Transition getDeleteTrans(String nodeId)
           
static Transition getListTransition(String type)
           
static Node getNode(ExpressoRequest request)
           
static Node getNode(ExpressoRequest request, String nodeId)
           
 Attribute getRepAttribute(Attribute[] attribs, Node node, String attribName)
           
static Attribute getRepAttribute(List attribs, Node node, String attribName)
           
protected  Block getSharedNodeBlock(String srcNodeId, String srcType, ExpressoRequest request, Part part, String nodeTitle, boolean canEdit)
          Utility to create an output block for a given shared node part.
 String getTitle()
          Returns the title of this controller
 void list(Node samplenode, ExpressoRequest request, ExpressoResponse response)
          List all nodes of type indicated by samplenode.
protected  void runAddGroupState(ExpressoRequest request, ExpressoResponse response)
          Edit permission groups for this node.
protected  void runDoAttribPickState(ServletControllerRequest request, ExpressoResponse response)
          Saves the picklist attributes.
protected  void runDoCloneNodeState(ExpressoRequest request, ExpressoResponse response)
          Clone either orphan or sibling.
protected  void runDoCloneTreeState(ExpressoRequest request, ExpressoResponse response)
          Clone either orphan or sibling.
protected  void runDoDeleteAttribState(ExpressoRequest request, ExpressoResponse response)
           
protected  void runDoDeleteNodeState(ServletControllerRequest request, ExpressoResponse response)
          Performs the deletion of the node after prompt state.
protected  void runDoEditAttribState(ServletControllerRequest request, ExpressoResponse response)
          Attribute info comes in as sets.
protected  void runDoEditMoreAttribState(ExpressoRequest request, ExpressoResponse response)
          Optional submit button for adding attributes AND getting chance to add more.
protected  void runDoPickListNodesState(ServletControllerRequest request, ExpressoResponse response)
           
protected  void runIndexState(ExpressoRequest request, ExpressoResponse response)
          Generate an index of all nodes--just use shortcuts from (auto) footer.
protected  void runListAllTypesState(ExpressoRequest request, ExpressoResponse response)
          List of lists.
protected  void runListNodesState(ExpressoRequest request, ExpressoResponse response)
          Lists the nodes for a particular type.
protected  void runPromptAddAttribState(ServletControllerRequest request, ExpressoResponse response)
          Prompts for adding an attribute.
protected  void runPromptAttribPickState(ExpressoRequest request, ExpressoResponse response)
          Prompts for editing a picklist attribute.
protected  void runPromptCloneNodeState(ExpressoRequest request, ExpressoResponse response)
          Prompts for cloning the node.
protected  void runPromptCloneTreeState(ExpressoRequest request, ExpressoResponse response)
          Prompts for cloning an entire tree of nodes.
protected  void runPromptDeleteNodeState(ExpressoRequest request, ExpressoResponse response)
          Prompt to confirm delete.
protected  void runPromptDeleteNodeTreeState(ExpressoRequest request, ExpressoResponse response)
          show lists of contained nodes that will be deleted (with checkmarks for opt-out) and list of contained nodes that will not because they are contained 'externally' to this tree.
protected  void runPromptEditAttribState(ExpressoRequest request, ExpressoResponse response)
          Prompts for editing a node attribute.
protected  void runPromptEditOneAttribState(ExpressoRequest request, ExpressoResponse response)
          Edits a single attribute.
protected  void runPromptEditPermsState(ExpressoRequest request, ExpressoResponse response)
          Edit permission groups for this node.
protected  void runPromptPickListNodesState(ExpressoRequest request, ExpressoResponse response)
          Display list with checkboxes and submit, in order to add relation to some other node.
protected  void runRemoveGroupState(ExpressoRequest request, ExpressoResponse response)
          Edit permission groups for this node.
protected  void runViewNodeState(ExpressoRequest request, ExpressoResponse response)
          synonym for method in AddNodeAction
protected  void runViewSingleAttributeState(ExpressoRequest request, ExpressoResponse response)
          Views a single attribute in its entirety.
protected  void runViewTreeState(ExpressoRequest request, ExpressoResponse response)
          Executes the view tree command.
protected  Attribute saveAttribute(ExpressoRequest request, int setNum)
          Write changes in attribute to DB.
 
Methods inherited from class com.sri.emo.controller.NodeController
addReturnToSenderParameter, propagateReturnToSenderParameter, redirectToSender
 
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, 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

LIST_NODE

public static final String LIST_NODE
Constant for access to state "List Nodes"

See Also:
Constant Field Values

PROMPT_PICKLIST_NODE

public static final String PROMPT_PICKLIST_NODE
Constant for access to state "Prompt Edit Picklist For Nodes"

See Also:
Constant Field Values

DO_PICKLIST_NODE

public static final String DO_PICKLIST_NODE
Constant for access to state "Save Picklist for nodes"

See Also:
Constant Field Values

PROMPT_EDIT_ATTRIB

public static final String PROMPT_EDIT_ATTRIB
Constant for access to state "Prompt Edit Attribute"

See Also:
Constant Field Values

DO_EDIT_ATTRIB

public static final String DO_EDIT_ATTRIB
Constant for access to state "Save Node Attributes"

See Also:
Constant Field Values

DO_DELETE_NODE

public static final String DO_DELETE_NODE
Constant for access to state "Delete Node"

See Also:
Constant Field Values

PROMPT_DELETE_NODE

public static final String PROMPT_DELETE_NODE
Constant for access to state "Prompt Delete Node"

See Also:
Constant Field Values

PROMPT_DELETE_NODE_TREE

public static final String PROMPT_DELETE_NODE_TREE
Constant for access to state "Prompt Delete A Node Tree"

See Also:
Constant Field Values

DO_EDIT_MORE_ATTRIB

public static final String DO_EDIT_MORE_ATTRIB
See Also:
Constant Field Values

DO_ATTRIB_PICK

public static final String DO_ATTRIB_PICK
See Also:
Constant Field Values

DO_DELETE_ONE_ATTRIB

public static final String DO_DELETE_ONE_ATTRIB
See Also:
Constant Field Values

PROMPT_CLONE_NODE

public static final String PROMPT_CLONE_NODE
Constant for access to state "Prompt Clone Node"

See Also:
Constant Field Values

PROMPT_CLONE_TREE

public static final String PROMPT_CLONE_TREE
Constant for access to state "Prompt Clone Node and its Parts"

See Also:
Constant Field Values

DO_CLONE_TREE

public static final String DO_CLONE_TREE
Constant for access to state "Clone a Tree Of Nodes"

See Also:
Constant Field Values

DO_CLONE_NODE

public static final String DO_CLONE_NODE
Constant for access to state "Clone a Single Node"

See Also:
Constant Field Values

DO_ORPHAN_CLONE_NODE

public static final String DO_ORPHAN_CLONE_NODE
See Also:
Constant Field Values

ADD_GROUP

public static final String ADD_GROUP
See Also:
Constant Field Values

INDEX

public static final String INDEX
See Also:
Constant Field Values

PROMPT_EDIT_PERMS

public static final String PROMPT_EDIT_PERMS
See Also:
Constant Field Values

REMOVE_GROUP

public static final String REMOVE_GROUP
See Also:
Constant Field Values

PROMPT_ADD_ATTRIB

public static final String PROMPT_ADD_ATTRIB
See Also:
Constant Field Values

PROMPT_ATTRIB_PICK

public static final String PROMPT_ATTRIB_PICK
See Also:
Constant Field Values

PROMPT_EDIT_ONE_ATTRIB

public static final String PROMPT_EDIT_ONE_ATTRIB
See Also:
Constant Field Values

DO_EDIT_ONE_ATTRIB

public static final String DO_EDIT_ONE_ATTRIB
See Also:
Constant Field Values

LIST_ALL_TYPES

public static final String LIST_ALL_TYPES
See Also:
Constant Field Values

VIEW_TREE

public static final String VIEW_TREE
Constant for access to state "View Node as Tree"

See Also:
Constant Field Values

VIEW_SINGLE_ATTRIBUTE

public static final String VIEW_SINGLE_ATTRIBUTE
Constant for access to state "View Single Attribute"

See Also:
Constant Field Values

PICK_LIST_ITEM

public static final String PICK_LIST_ITEM
checkbox name

See Also:
Constant Field Values

ARE_MULTIPLE_ITEMS

public static final String ARE_MULTIPLE_ITEMS
See Also:
Constant Field Values

TYPE_TRANS

public static final String TYPE_TRANS
See Also:
Constant Field Values

PERMS_BLOCK

public static final String PERMS_BLOCK
See Also:
Constant Field Values

OMIT_TYPES

public static final String OMIT_TYPES
setup code for list of node types to omit from a tree listing; use "|" to delimit items in one string.

See Also:
Constant Field Values

TITLE_SORT

public static final String TITLE_SORT
sorting columns for lists

See Also:
Constant Field Values

DESCENDING_FLAG

public static final String DESCENDING_FLAG
See Also:
Constant Field Values

ASCENDING_FLAG

public static final String ASCENDING_FLAG
See Also:
Constant Field Values

TITLE_SORT_DESC

public static final String TITLE_SORT_DESC
See Also:
Constant Field Values

GROUP_SORT

public static final String GROUP_SORT
See Also:
Constant Field Values

GROUP_SORT_DESC

public static final String GROUP_SORT_DESC
See Also:
Constant Field Values

OWNER_SORT

public static final String OWNER_SORT
See Also:
Constant Field Values

OWNER_SORT_DESC

public static final String OWNER_SORT_DESC
See Also:
Constant Field Values

KEYWORD_SORT

public static final String KEYWORD_SORT
See Also:
Constant Field Values

KEYWORD_SORT_DESC

public static final String KEYWORD_SORT_DESC
See Also:
Constant Field Values

ALL_SORTS

public static final String[][] ALL_SORTS

SIBLING_MARKER

public static final String SIBLING_MARKER
flavors for cloning

See Also:
Constant Field Values

RELATION_TARGET

public static final String RELATION_TARGET
See Also:
Constant Field Values

FILTER_SESSION_KEY

public static final String FILTER_SESSION_KEY
See Also:
Constant Field Values

SORT_PARAM

public static final String SORT_PARAM
See Also:
Constant Field Values
Constructor Detail

NodeAction

public NodeAction()
Method Detail

getTitle

public String getTitle()
Returns the title of this controller

Overrides:
getTitle in class Controller
Returns:
java.lang.String

runListNodesState

protected void runListNodesState(ExpressoRequest request,
                                 ExpressoResponse response)
                          throws ControllerException
Lists the nodes for a particular type.

Parameters:
request - ExpressoRequest
response - ExpressoResponse
Throws:
ControllerException

list

public void list(Node samplenode,
                 ExpressoRequest request,
                 ExpressoResponse response)
          throws ControllerException,
                 DBException
List all nodes of type indicated by samplenode.

Parameters:
samplenode - has given type, but may NOT have an ID--it is just a sample
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.
DBException - upon database related error.

checkEmbedded

public static void checkEmbedded(ExpressoRequest request,
                                 Transition addTransition)
add a parameter to any transition if we are embedded


generatePageTransitions

protected Block generatePageTransitions(ExpressoRequest request,
                                        RecordPaginator rp,
                                        int pageLimit)
                                 throws ControllerException
Generates the page transitions.

Parameters:
request - expresso request.
rp - the record paginator.
pageLimit - the maximum number of page links to display at a time. (10, for example, is a good number).
Returns:
a block with the appropriate page transitions
Throws:
ControllerException

runPromptPickListNodesState

protected void runPromptPickListNodesState(ExpressoRequest request,
                                           ExpressoResponse response)
                                    throws ControllerException
Display list with checkboxes and submit, in order to add relation to some other node.

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.

runDoPickListNodesState

protected void runDoPickListNodesState(ServletControllerRequest request,
                                       ExpressoResponse response)
                                throws ControllerException,
                                       DBException
Throws:
ControllerException
DBException

runDoEditMoreAttribState

protected void runDoEditMoreAttribState(ExpressoRequest request,
                                        ExpressoResponse response)
                                 throws ControllerException
Optional submit button for adding attributes AND getting chance to add more.

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.

runDoEditAttribState

protected void runDoEditAttribState(ServletControllerRequest request,
                                    ExpressoResponse response)
                             throws ControllerException,
                                    NonHandleableException
Attribute info comes in as sets. A set includes the attribute value, comment, and either

1) id (if existing) or

2) type (if new)

We can pick any one of the set, like the value item, then save all the items in the set with that set number (the number is the suffix of the param name)

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.
NonHandleableException - upon transition error.

runDoAttribPickState

protected void runDoAttribPickState(ServletControllerRequest request,
                                    ExpressoResponse response)
                             throws ControllerException,
                                    NonHandleableException
Saves the picklist attributes.

Parameters:
request - ServletControllerRequest the servlet controller request (servlet environment only)
response - ExpressoResponse the controller response
Throws:
ControllerException - upon error.
NonHandleableException - upon fatal error.

runDoDeleteAttribState

protected void runDoDeleteAttribState(ExpressoRequest request,
                                      ExpressoResponse response)
                               throws ControllerException
Throws:
ControllerException

runPromptEditAttribState

protected void runPromptEditAttribState(ExpressoRequest request,
                                        ExpressoResponse response)
                                 throws ControllerException
Prompts for editing a node attribute.

Parameters:
request - ExpressoRequest
response - ExpressoResponse
Throws:
ControllerException

getRepAttribute

public static Attribute getRepAttribute(List attribs,
                                        Node node,
                                        String attribName)
                                 throws DBException
Throws:
DBException

getRepAttribute

public Attribute getRepAttribute(Attribute[] attribs,
                                 Node node,
                                 String attribName)
                          throws DBException
Throws:
DBException

runPromptAttribPickState

protected void runPromptAttribPickState(ExpressoRequest request,
                                        ExpressoResponse response)
                                 throws ControllerException
Prompts for editing a picklist attribute.

Parameters:
request - ExpressoRequest the ExpressoRequest object.
response - ExpressoResponse the ExpressoResponse object.
Throws:
ControllerException - upon error.

runPromptAddAttribState

protected void runPromptAddAttribState(ServletControllerRequest request,
                                       ExpressoResponse response)
                                throws ControllerException
Prompts for adding an attribute.

Parameters:
request - ExpressoRequest The ExpressoRequest object.
response - ExpressoResponse The ExpressoResponse object.
Throws:
ControllerException - upon error.

runPromptEditOneAttribState

protected void runPromptEditOneAttribState(ExpressoRequest request,
                                           ExpressoResponse response)
                                    throws ControllerException
Edits a single attribute.

Parameters:
request - ExpressoRequest
response - ExpressoResponse
Throws:
ControllerException

getNode

public static Node getNode(ExpressoRequest request,
                           String nodeId)
                    throws DBException
Throws:
DBException

saveAttribute

protected Attribute saveAttribute(ExpressoRequest request,
                                  int setNum)
                           throws ControllerException
Write changes in attribute to DB. An erased attribute means that we should *delete* the item from the DB.

Parameters:
request - The ExpressoRequest Object
setNum - integer
Returns:
Attribute
Throws:
ControllerException - upon error.

getAttributeInputBlock

protected Block getAttributeInputBlock(Attribute[] attribs,
                                       Part part,
                                       ExpressoRequest request,
                                       boolean readOnly)
                                throws ControllerException
Utility to create an input block for a given attribute part.

this method is complicated by fact that we must associate sets of items together as inputs; we'll get back just a pile of parameters from the HTML page POST, so we need a way to prefix param names such that they can be grouped together later.

Parameters:
attribs - The attributes for the part.
part - The part itself. later.
request - The ExpressoRequest object
Returns:
populated Block
Throws:
ControllerException - upon error.

addPicklist

public static Block addPicklist(Part part,
                                ExpressoRequest request,
                                ExpressoResponse response,
                                String nodeId)
                         throws Exception
Throws:
Exception

getSharedNodeBlock

protected Block getSharedNodeBlock(String srcNodeId,
                                   String srcType,
                                   ExpressoRequest request,
                                   Part part,
                                   String nodeTitle,
                                   boolean canEdit)
                            throws ControllerException,
                                   DBException
Utility to create an output block for a given shared node part.

Parameters:
srcNodeId - The source node.
srcType - The source node type.
request - The ExpressoRequest object
part - the Part we're rendering to the block.
nodeTitle - Unused
canEdit - true if the node can be edited.
Returns:
populated block.
Throws:
ControllerException - upon error.
DBException - upon database error.

runPromptDeleteNodeState

protected void runPromptDeleteNodeState(ExpressoRequest request,
                                        ExpressoResponse response)
                                 throws ControllerException
Prompt to confirm delete.

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.

getNode

public static Node getNode(ExpressoRequest request)
                    throws ControllerException,
                           DBException
Throws:
ControllerException
DBException

runPromptDeleteNodeTreeState

protected void runPromptDeleteNodeTreeState(ExpressoRequest request,
                                            ExpressoResponse response)
                                     throws ControllerException
show lists of contained nodes that will be deleted (with checkmarks for opt-out) and list of contained nodes that will not because they are contained 'externally' to this tree.

algorithm is complex: we can determine internal/external links easily enough when given a hash of all nodes in tree: any links to tree-external node makes a node undeletable. But for all the nodes considered 'internal' on the first pass, some of their containers might be declared undeletable. Then we need additional passes to make sure the nodes established as undeletable in pass N-1 also 'preserves' any nodes it contains.

In other words, a branch is deleted only if its root is not external, and vice-versa.

Throws:
ControllerException

runDoDeleteNodeState

protected void runDoDeleteNodeState(ServletControllerRequest request,
                                    ExpressoResponse response)
                             throws ControllerException
Performs the deletion of the node after prompt state.

Parameters:
request - ServletControllerRequest the servlet controller request.
response - ExpressoResponse
Throws:
ControllerException

getListTransition

public static Transition getListTransition(String type)
Parameters:
type - node type of desired list; null is ok--will default to first list (design patterns)
Returns:
Transition.

runPromptCloneNodeState

protected void runPromptCloneNodeState(ExpressoRequest request,
                                       ExpressoResponse response)
                                throws ControllerException
Prompts for cloning the node.

Parameters:
request - ExpressoRequest
response - ExpressoResponse
Throws:
ControllerException

runPromptCloneTreeState

protected void runPromptCloneTreeState(ExpressoRequest request,
                                       ExpressoResponse response)
                                throws ControllerException
Prompts for cloning an entire tree of nodes.

Parameters:
request - ExpressoRequest
response - ExpressoResponse
Throws:
ControllerException

runDoCloneNodeState

protected void runDoCloneNodeState(ExpressoRequest request,
                                   ExpressoResponse response)
                            throws ControllerException,
                                   DBException
Clone either orphan or sibling. If this is the ORPHAN clone, where "owning" relations are not copied, creating an orphan object has links to the shared relations "below" it in the "part of" relation hierarchy, but not links to similar relations "above" this object. in contrast, sibling clones also duplicated the 'container' relations

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.
DBException

runDoCloneTreeState

protected void runDoCloneTreeState(ExpressoRequest request,
                                   ExpressoResponse response)
                            throws ControllerException
Clone either orphan or sibling. if this is the ORPHAN clone, where "owning" relations are not copied, creating an orphan object has links to the shared relations "below" it in the "part of" relation hierarchy, but not links to similar relations "above" this object. in contrast, sibling clones also duplicated the 'container' relations

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.

runIndexState

protected void runIndexState(ExpressoRequest request,
                             ExpressoResponse response)
                      throws ControllerException
Generate an index of all nodes--just use shortcuts from (auto) footer.

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.

runPromptEditPermsState

protected void runPromptEditPermsState(ExpressoRequest request,
                                       ExpressoResponse response)
                                throws ControllerException
Edit permission groups for this node.

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.

runRemoveGroupState

protected void runRemoveGroupState(ExpressoRequest request,
                                   ExpressoResponse response)
                            throws ControllerException
Edit permission groups for this node.

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.

runAddGroupState

protected void runAddGroupState(ExpressoRequest request,
                                ExpressoResponse response)
                         throws ControllerException
Edit permission groups for this node.

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.

runListAllTypesState

protected void runListAllTypesState(ExpressoRequest request,
                                    ExpressoResponse response)
                             throws ControllerException
List of lists.

Parameters:
request - The ExpressoRequest object.
response - The ExpressoResponse object.
Throws:
ControllerException - upon error.

getDeleteTrans

public static Transition getDeleteTrans(String nodeId)

runViewSingleAttributeState

protected void runViewSingleAttributeState(ExpressoRequest request,
                                           ExpressoResponse response)
                                    throws ControllerException,
                                           DBException
Views a single attribute in its entirety. Useful for when somebody does not have permission to update an attribute, but the attribute label is truncates (such as in treeview)

Parameters:
request - ExpressoRequest the ExpressoRequest object.
response - ExpressoResponse the ExpressoResponse object.
Throws:
ControllerException - upon controller framework related error.
DBException - upon database access related error.

runViewNodeState

protected void runViewNodeState(ExpressoRequest request,
                                ExpressoResponse response)
                         throws ControllerException,
                                DBException,
                                NonHandleableException
synonym for method in AddNodeAction

Parameters:
request - ExpressoRequest
response - ExpressoResponse
Throws:
ControllerException
DBException
NonHandleableException

runViewTreeState

protected void runViewTreeState(ExpressoRequest request,
                                ExpressoResponse response)
                         throws ControllerException,
                                DBException,
                                NonHandleableException
Executes the view tree command.

Parameters:
request - ExpressoRequest
response - ExpressoResponse
Throws:
ControllerException
DBException
NonHandleableException


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