|
||||||||||
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.AddNodeAction
public class AddNodeAction
Handle Node manipulation.
Field Summary | |
---|---|
static String |
APPEND_TO_TITLE
|
static String |
DEC_ATTRIB_ORDER
|
static String |
DEC_REL_ORDER
|
static String |
DELETE_STRAY_ATTRIBUTES
|
static String |
DO_EDIT_NODE
|
static String |
DO_EXPORT_NODE
|
static String |
DO_IMPORT_NODE
|
static String |
EDIT_GROUP_DISPLAY
|
static String |
FINISH_IMPORT
|
static String |
INC_ATTRIB_ORDER
|
static String |
INC_REL_ORDER
|
static String |
IS_CHANGE_TITLE
|
static int |
MAX_CHARS_OUTPUT
limit number of chars that appear in display for a given field |
static String |
PICK_LIST_ITEM
checkbox name |
static String |
PICKLISTS_TAGNAME
|
static String |
PROMPT_EDIT_NODE
|
static String |
PROMPT_EXPORT_NODE
|
static String |
PROMPT_IMPORT_NODE
|
static String |
RETURN_TO
|
static String |
VIEW_NODE
|
static String |
VIEW_PART
|
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, EMBEDDED_MODE, FOOTER, 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 | |
---|---|
AddNodeAction()
|
Method Summary | |
---|---|
static void |
addTags(Node queryNode,
ExpressoRequest request,
ExpressoResponse response)
Grabs all node tags and drops them into a request attribute called 'NodeTags' that the JSP can modify. |
static void |
deleteAttributes(List attribsLeftOver,
Node srcNode)
|
static void |
deleteJoinedRelations(List relLeftOver,
Node srcNode)
|
static void |
filterAttribs(List allAttribs,
Part part,
ArrayList attribsForThisPart)
iterate through list of all attributes and filter those that belong to the specified Part into the output list |
static List |
filterIamPartOfJoinedRelations(List allRelations)
remove relations of type "I am a part of" because these are reflexive relations, not intended as true parts |
static void |
filterJoinedDataObjectRelations(List allRelations,
Part part,
List relatedDataObjectsForThisPart)
|
protected Block |
getAttributeInputBlock(String nodeId,
String srcNodeType,
ExpressoRequest request,
String attribName)
utility to create an input block for a given attribute part. |
protected Block |
getAttributeOutputBlock(Node node,
ExpressoRequest request,
Part part,
boolean canEdit,
List attribs)
Utility to create an output block for a given attribute part. |
protected ArrayList |
getAttributes(String parentNodeId,
ExpressoRequest request,
String attribType)
Return an attributes of this node, of this type. |
protected Block |
getBlock(Node node,
ExpressoRequest request,
Part part,
boolean canEdit,
List attribs,
List relatedNodes)
|
protected Block |
getSharedNodeBlock(Node node,
ExpressoRequest request,
Part part,
boolean canEdit,
List relatedNodes)
Utility to create an output block for a given shared node part. |
String |
getTitle()
Returns the title of this controller. |
static Transition |
getViewTrans(String nodeId)
|
protected void |
runDecAttribOrderState(ExpressoRequest request,
ExpressoResponse response)
increment order of this attribute |
protected void |
runDecRelOrderState(ExpressoRequest request,
ExpressoResponse response)
Dec order of this relation. |
protected void |
runDoEditNodeState(ExpressoRequest request,
ExpressoResponse response)
handle updates to node info--not attributes or shared relations, but the few fields that the node owns: title, annotation, comment |
protected void |
runDoExportNodeState(ExpressoRequest request,
ExpressoResponse response)
Prompt for preferred xml format. |
protected void |
runDoImportNodeState(ExpressoRequest request,
ExpressoResponse response)
Prompt import of node from xml. |
protected void |
runIncAttribOrderState(ExpressoRequest request,
ExpressoResponse response)
Increment order of this attribute |
protected void |
runIncRelOrderState(ExpressoRequest request,
ExpressoResponse response)
Increment order of this relation. |
protected void |
runPromptEditNodeState(ExpressoRequest request,
ExpressoResponse response)
prompt for NEW node or updates to node info--not attributes or shared relations, but the few fields that the node owns: title, annotation, comment. |
protected void |
runPromptExportNodeState(ExpressoRequest request,
ExpressoResponse response)
Prompt for preferred xml format. |
protected void |
runPromptImportNodeState(ExpressoRequest request,
ExpressoResponse response)
Prompt import of node from xml. |
protected void |
runViewNodeState(ExpressoRequest request,
ExpressoResponse response)
Show view of node. |
protected void |
runViewPartState(ExpressoRequest request,
ExpressoResponse response)
Views all attributes or relations of a given part. |
protected void |
saveAttribute(ExpressoRequest request,
int setNum)
Write changes in attribute to DB. |
void |
view(Node querynode,
ExpressoRequest request,
ExpressoResponse response)
Views a given node. |
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 VIEW_NODE
public static final String PROMPT_EXPORT_NODE
public static final String DO_EXPORT_NODE
public static final String PROMPT_EDIT_NODE
public static final String DO_EDIT_NODE
public static final String PROMPT_IMPORT_NODE
public static final String DO_IMPORT_NODE
public static final String FINISH_IMPORT
public static final String INC_ATTRIB_ORDER
public static final String DEC_ATTRIB_ORDER
public static final String INC_REL_ORDER
public static final String DEC_REL_ORDER
public static final String EDIT_GROUP_DISPLAY
public static final String VIEW_PART
public static final int MAX_CHARS_OUTPUT
public static final String PICK_LIST_ITEM
public static final String RETURN_TO
public static final String PICKLISTS_TAGNAME
public static final String IS_CHANGE_TITLE
public static final String APPEND_TO_TITLE
public static final String DELETE_STRAY_ATTRIBUTES
Constructor Detail |
---|
public AddNodeAction()
Method Detail |
---|
public String getTitle()
getTitle
in class Controller
protected void runViewNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- the ExpressoRequest
object.response
- the ExpressoResponse
object.
ControllerException
- upon error.protected void runPromptExportNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- the ExpressoRequest
object.response
- the ExpressoResponse
object.
ControllerException
- upon error.protected void runDoExportNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- the ExpressoRequest
object.response
- the ExpressoResponse
object.
ControllerException
- upon error.public void view(Node querynode, ExpressoRequest request, ExpressoResponse response) throws DBException, ControllerException
querynode
- Node the node we're querying to form the data.request
- ExpressoRequest the ExpressoRequest object.response
- ExpressoResponse The ExpressoResponse object.
DBException
- upon error querying/operating on the node.
ControllerException
- upon error populating the ExpressoResponse
object.public static void addTags(Node queryNode, ExpressoRequest request, ExpressoResponse response) throws DBException, ControllerException
queryNode
- Node the current node we're viewing.request
- ExpressoRequest the requestresponse
- ExpressoResposne the response
DBException
- upon database error.
ControllerException
- upon adding controller element error.public static List filterIamPartOfJoinedRelations(List allRelations) throws DBException
DBException
public static void filterJoinedDataObjectRelations(List allRelations, Part part, List relatedDataObjectsForThisPart) throws DBException
DBException
public static void filterAttribs(List allAttribs, Part part, ArrayList attribsForThisPart) throws DBException
allAttribs
- input list of Attributepart
- membership criteria (the part type)attribsForThisPart
- output list
DBException
public static void deleteAttributes(List attribsLeftOver, Node srcNode) throws DBException
attribsLeftOver
- list of Attribute which should be deleted
DBException
public static void deleteJoinedRelations(List relLeftOver, Node srcNode) throws DBException
relLeftOver
- list of JoinedDataObject which should have relation elements deleted
DBException
protected void runPromptEditNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- the ExpressoRequest
object.response
- the ExpressoResponse
object.
ControllerException
- upon error.protected void saveAttribute(ExpressoRequest request, int setNum) throws ControllerException
request
- the ExpressoRequest
object.setNum
- the set number.
ControllerException
- upon error.protected Block getBlock(Node node, ExpressoRequest request, Part part, boolean canEdit, List attribs, List relatedNodes) throws DBException, ControllerException
DBException
ControllerException
protected ArrayList getAttributes(String parentNodeId, ExpressoRequest request, String attribType) throws ControllerException
parentNodeId
- the id of the parent in the tree.request
- the ExpressoRequest
object.attribType
- the attribute type.
ControllerException
- upon error.protected Block getAttributeOutputBlock(Node node, ExpressoRequest request, Part part, boolean canEdit, List attribs) throws DBException, ControllerException
node
- the parent noderequest
- the ExpressoRequest
object.part
- the Part
to get the attributes from.canEdit
- true if you want a transition link
to the edit controllerattribs
- A list of attributes
DBException
- upon database related error.
ControllerException
- upon Expresso controller related error.protected Block getAttributeInputBlock(String nodeId, String srcNodeType, ExpressoRequest request, String attribName) throws ControllerException
nodeId
- the id of the node.srcNodeType
- source the node type.request
- The ExpressoRequest objectattribName
- the name of the attribute to populate
ControllerException
- upon any sort of error.protected Block getSharedNodeBlock(Node node, ExpressoRequest request, Part part, boolean canEdit, List relatedNodes) throws DBException, ControllerException
node
- the source noderequest
- ExpressoRequest The ExpressoRequest
objectpart
- Part the part we're querying.canEdit
- boolean true if the user can edit the noderelatedNodes
- list of multidbobjects from node.getRawRelated() of related node info.
DBException
- upon database access error
ControllerException
- upon Controller related error.protected void runDoEditNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ServletExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.protected void runPromptImportNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.protected void runDoImportNodeState(ExpressoRequest request, ExpressoResponse response) throws ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.public static Transition getViewTrans(String nodeId)
protected void runIncAttribOrderState(ExpressoRequest request, ExpressoResponse response) throws DBException, ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.
DBException
- upon database related error.protected void runDecAttribOrderState(ExpressoRequest request, ExpressoResponse response) throws DBException, ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.
DBException
- upon database related error.protected void runIncRelOrderState(ExpressoRequest request, ExpressoResponse response) throws DBException, ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.
DBException
- upon database related error.protected void runDecRelOrderState(ExpressoRequest request, ExpressoResponse response) throws DBException, ControllerException
request
- The ExpressoRequest object.response
- The ExpressoResponse object.
ControllerException
- upon error.
DBException
- upon database related error.protected void runViewPartState(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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |