|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.struts.action.Action com.jcorporate.expresso.core.controller.Controller com.jcorporate.expresso.core.controller.DBController com.sri.common.controller.AbstractDBController com.sri.common.controller.AbstractComponentController com.sri.emo.controller.NodeController com.sri.emo.controller.NodeAction
public class NodeAction
Handle Node manipulation.
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 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 |
---|
public static final String LIST_NODE
public static final String PROMPT_PICKLIST_NODE
public static final String DO_PICKLIST_NODE
public static final String PROMPT_EDIT_ATTRIB
public static final String DO_EDIT_ATTRIB
public static final String DO_DELETE_NODE
public static final String PROMPT_DELETE_NODE
public static final String PROMPT_DELETE_NODE_TREE
public static final String DO_EDIT_MORE_ATTRIB
public static final String DO_ATTRIB_PICK
public static final String DO_DELETE_ONE_ATTRIB
public static final String PROMPT_CLONE_NODE
public static final String PROMPT_CLONE_TREE
public static final String DO_CLONE_TREE
public static final String DO_CLONE_NODE
public static final String DO_ORPHAN_CLONE_NODE
public static final String ADD_GROUP
public static final String INDEX
public static final String PROMPT_EDIT_PERMS
public static final String REMOVE_GROUP
public static final String PROMPT_ADD_ATTRIB
public static final String PROMPT_ATTRIB_PICK
public static final String PROMPT_EDIT_ONE_ATTRIB
public static final String DO_EDIT_ONE_ATTRIB
public static final String LIST_ALL_TYPES
public static final String VIEW_TREE
public static final String VIEW_SINGLE_ATTRIBUTE
public static final String PICK_LIST_ITEM
public static final String ARE_MULTIPLE_ITEMS
public static final String TYPE_TRANS
public static final String PERMS_BLOCK
public static final String OMIT_TYPES
public static final String TITLE_SORT
public static final String DESCENDING_FLAG
public static final String ASCENDING_FLAG
public static final String TITLE_SORT_DESC
public static final String GROUP_SORT
public static final String GROUP_SORT_DESC
public static final String OWNER_SORT
public static final String OWNER_SORT_DESC
public static final String KEYWORD_SORT
public static final String KEYWORD_SORT_DESC
public static final String[][] ALL_SORTS
public static final String SIBLING_MARKER
public static final String RELATION_TARGET
public static final String FILTER_SESSION_KEY
public static final String SORT_PARAM
Constructor Detail |
---|
public NodeAction()
Method Detail |
---|
public String getTitle()
getTitle
in class Controller
protected void runListNodesState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- ExpressoRequestresponse
- ExpressoResponse
ControllerException
public void list(Node samplenode, ExpressoRequest request, ExpressoResponse response) throws ControllerException, DBException
samplenode
- has given type, but may NOT have an ID--it is just a samplerequest
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.
DBException
- upon database related error.public static void checkEmbedded(ExpressoRequest request, Transition addTransition)
protected Block generatePageTransitions(ExpressoRequest request, RecordPaginator rp, int pageLimit) throws ControllerException
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).
ControllerException
protected void runPromptPickListNodesState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.protected void runDoPickListNodesState(ServletControllerRequest request, ExpressoResponse response) throws ControllerException, DBException
ControllerException
DBException
protected void runDoEditMoreAttribState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.protected void runDoEditAttribState(ServletControllerRequest request, ExpressoResponse response) throws ControllerException, NonHandleableException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.
NonHandleableException
- upon transition error.protected void runDoAttribPickState(ServletControllerRequest request, ExpressoResponse response) throws ControllerException, NonHandleableException
request
- ServletControllerRequest the servlet controller request
(servlet environment only)response
- ExpressoResponse the controller response
ControllerException
- upon error.
NonHandleableException
- upon fatal error.protected void runDoDeleteAttribState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
ControllerException
protected void runPromptEditAttribState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- ExpressoRequestresponse
- ExpressoResponse
ControllerException
public static Attribute getRepAttribute(List attribs, Node node, String attribName) throws DBException
DBException
public Attribute getRepAttribute(Attribute[] attribs, Node node, String attribName) throws DBException
DBException
protected void runPromptAttribPickState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- ExpressoRequest the ExpressoRequest object.response
- ExpressoResponse the ExpressoResponse object.
ControllerException
- upon error.protected void runPromptAddAttribState(ServletControllerRequest request, ExpressoResponse response) throws ControllerException
request
- ExpressoRequest The ExpressoRequest object.response
- ExpressoResponse The ExpressoResponse object.
ControllerException
- upon error.protected void runPromptEditOneAttribState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- ExpressoRequestresponse
- ExpressoResponse
ControllerException
public static Node getNode(ExpressoRequest request, String nodeId) throws DBException
DBException
protected Attribute saveAttribute(ExpressoRequest request, int setNum) throws ControllerException
request
- The ExpressoRequest ObjectsetNum
- integer
ControllerException
- upon error.protected Block getAttributeInputBlock(Attribute[] attribs, Part part, ExpressoRequest request, boolean readOnly) throws ControllerException
attribs
- The attributes for the part.part
- The part itself. later.request
- The ExpressoRequest object
ControllerException
- upon error.public static Block addPicklist(Part part, ExpressoRequest request, ExpressoResponse response, String nodeId) throws Exception
Exception
protected Block getSharedNodeBlock(String srcNodeId, String srcType, ExpressoRequest request, Part part, String nodeTitle, boolean canEdit) throws ControllerException, DBException
srcNodeId
- The source node.srcType
- The source node type.request
- The ExpressoRequest objectpart
- the Part we're rendering to the block.nodeTitle
- UnusedcanEdit
- true if the node can be edited.
ControllerException
- upon error.
DBException
- upon database error.protected void runPromptDeleteNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.public static Node getNode(ExpressoRequest request) throws ControllerException, DBException
ControllerException
DBException
protected void runPromptDeleteNodeTreeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
ControllerException
protected void runDoDeleteNodeState(ServletControllerRequest request, ExpressoResponse response) throws ControllerException
request
- ServletControllerRequest the servlet controller request.response
- ExpressoResponse
ControllerException
public static Transition getListTransition(String type)
type
- node type of desired list; null is ok--will default to first
list (design patterns)
protected void runPromptCloneNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- ExpressoRequestresponse
- ExpressoResponse
ControllerException
protected void runPromptCloneTreeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- ExpressoRequestresponse
- ExpressoResponse
ControllerException
protected void runDoCloneNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException, DBException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.
DBException
protected void runDoCloneTreeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.protected void runIndexState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.protected void runPromptEditPermsState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.protected void runRemoveGroupState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.protected void runAddGroupState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.protected void runListAllTypesState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.public static Transition getDeleteTrans(String nodeId)
protected void runViewSingleAttributeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException, DBException
request
- ExpressoRequest the ExpressoRequest object.response
- ExpressoResponse the ExpressoResponse object.
ControllerException
- upon controller framework related error.
DBException
- upon database access related error.protected void runViewNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException, DBException, NonHandleableException
request
- ExpressoRequestresponse
- ExpressoResponse
ControllerException
DBException
NonHandleableException
protected void runViewTreeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException, DBException, NonHandleableException
request
- ExpressoRequestresponse
- ExpressoResponse
ControllerException
DBException
NonHandleableException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |