public abstract class AbstractRelationAction extends AbstractNodeAction
| Modifier and Type | Field and Description |
|---|---|
protected Node |
destinationNode |
protected String |
destinationNodeNumber |
protected String |
destinationNodeRef |
protected RelationManager |
relationManager |
protected String |
relationValues |
protected String |
role |
protected Node |
sourceNode |
protected String |
sourceNodeNumber |
protected String |
sourceNodeRef |
| Constructor and Description |
|---|
AbstractRelationAction() |
| Modifier and Type | Method and Description |
|---|---|
protected Node |
createNode(Transaction transaction,
Map<String,Node> idMap,
javax.servlet.http.HttpServletRequest request)
This template method implementation handles all the preconditions for relation actions.
|
protected abstract Node |
createRelation(Transaction transaction,
Map<String,Node> idMap,
javax.servlet.http.HttpServletRequest request)
This template method should be implemented by concrete implementations of
this class.
|
String |
getDestinationNodeNumber() |
String |
getDestinationNodeRef() |
protected Map<String,Object> |
getRelationValues()
TODO.
|
String |
getRole() |
String |
getSourceNodeNumber() |
String |
getSourceNodeRef() |
protected void |
putValues(Step relationStep,
Constraint constraint,
Map<String,Object> values) |
protected Node |
resolveNode(String refNotFoundErrorKey,
String nodeRef,
String nodenr,
Map<String,Node> idMap,
Transaction transaction)
Try to resolve a node, by trying either the nodenr or node ref.
|
protected boolean |
resolveSourceAndDestination(Transaction transaction,
Map<String,Node> idMap)
(try to) resolve the source and destination nodes for this relation.
|
void |
setDestinationNodeNumber(String destinationNodeNumber) |
void |
setDestinationNodeRef(String destinationNodeRef) |
void |
setRelationValues(String s)
Sets the values which must be set in the relation.
|
void |
setRole(String role) |
void |
setSourceNodeNumber(String sourceNodeNumber) |
void |
setSourceNodeRef(String sourceNodeRef) |
addCachFlushHint, addFieldError, addFieldError, addFieldErrorTypeMessage, addFieldErrorTypeValue, addGlobalError, addGlobalError, addNodeParam, addParam, createCacheFlushHints, getDateFields, getFields, getFile, getId, getLocale, getNode, hasChanged, hasErrors, isNodeNullIllegal, mayCreate, mayDelete, mayWrite, process, processNode, setChanged, setDateFields, setFields, setFile, setHtmlField, setId, shouldProcess, toStringprotected Node sourceNode
protected Node destinationNode
protected String sourceNodeNumber
protected String destinationNodeNumber
protected String sourceNodeRef
protected String destinationNodeRef
protected String role
protected RelationManager relationManager
protected String relationValues
protected final Node createNode(Transaction transaction, Map<String,Node> idMap, javax.servlet.http.HttpServletRequest request)
this#doCreateNode(Transaction, Map, HttpServletRequest)
When you create specific relation actions, you extend this class and implement that method.createNode in class AbstractNodeActiontransaction - the mmmbase transactionprotected abstract Node createRelation(Transaction transaction, Map<String,Node> idMap, javax.servlet.http.HttpServletRequest request)
createNode(Transaction, Map, HttpServletRequest) after all
the preliminary checks.transaction - idMap - request - protected final Node resolveNode(String refNotFoundErrorKey, String nodeRef, String nodenr, Map<String,Node> idMap, Transaction transaction)
refNotFoundErrorKey - nodeRef - nodenr - idMap - transaction - protected final boolean resolveSourceAndDestination(Transaction transaction, Map<String,Node> idMap)
public void setSourceNodeNumber(String sourceNodeNumber)
public String getDestinationNodeNumber()
public void setDestinationNodeNumber(String destinationNodeNumber)
public String getSourceNodeRef()
public void setSourceNodeRef(String sourceNodeRef)
public String getDestinationNodeRef()
public void setDestinationNodeRef(String destinationNodeRef)
public String getSourceNodeNumber()
public String getRole()
public void setRole(String role)
public void setRelationValues(String s)
protected void putValues(Step relationStep, Constraint constraint, Map<String,Object> values)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}