public abstract class AbstractNodeAction extends Action
org.mmbase.datatypes.handler.html| Constructor and Description |
|---|
AbstractNodeAction() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addCachFlushHint(CacheFlushHint hint) |
protected void |
addFieldError(String field,
String key)
Create a field error for this action, using a key without place holder values
|
protected void |
addFieldError(String field,
String key,
String[] placeholderValues)
Creates a field error for this action
|
protected void |
addFieldErrorTypeMessage(String field,
String message)
Creates a field error for this action, where there is some sort of error when setting the field.
|
protected void |
addFieldErrorTypeValue(String field,
String value)
Creates a field error for this action, where the value set on some field is invalid.
|
protected void |
addGlobalError(String key)
Creates a global error for this action.
|
protected void |
addGlobalError(String key,
String[] placeholderValues)
Creates a global error for this action.
|
protected void |
addNodeParam(String name) |
protected void |
addParam(String name,
String value) |
protected abstract void |
createCacheFlushHints()
This template method is called when the node to edit is changed.
|
protected abstract Node |
createNode(Transaction transaction,
Map<String,Node> idMap,
javax.servlet.http.HttpServletRequest request)
This template method is called to obtain the node for this action.
|
Map<String,DateTime> |
getDateFields() |
Map<String,String> |
getFields() |
org.springframework.web.multipart.MultipartFile |
getFile() |
String |
getId() |
protected Locale |
getLocale() |
protected Node |
getNode() |
protected boolean |
hasChanged() |
protected boolean |
hasErrors() |
protected boolean |
isNodeNullIllegal()
This template method determines if it is an error when the node is null.
|
protected boolean |
mayCreate(NodeManager nodeManager)
can the current owner create a node of this type? set global error when fail.
|
protected boolean |
mayDelete(Node node)
can the current owner delete this node? set global error when fail.
|
protected boolean |
mayWrite(NodeManager nodeManager)
can the current owner create a node of this type? set global error when fail.
|
void |
process(ResultContainer resultContainer)
This final method calls the different template methods, that are either abstract or have a default
implementation.
|
protected void |
processNode(Transaction transaction)
This template method is called after the values that have been injected in this action in the fields and
datefields collections, as well as the file field have been set on the node.
|
protected void |
setChanged()
call this method to set the changed flag on this node
|
void |
setDateFields(Map<String,DateTime> dateFields) |
void |
setFields(Map<String,String> fields) |
void |
setFile(org.springframework.web.multipart.MultipartFile file) |
void |
setHtmlField(String htmlField) |
void |
setId(String id) |
protected boolean |
shouldProcess(Node node)
this template method is called before any changes are made to the node to edit.
|
String |
toString() |
public final void process(ResultContainer resultContainer)
#getNode(Transaction, HttpServletRequest) is called to obtain a node instance
shouldProcess(Node) is called to determine if the operation should proceed (if this depends on some
specific criterium.)
#processNode(Node, ResultContainer) is called after the default fields are set (fields collection,
datefields collection and file field).
createCacheFlushHints() is called to return the appropriate cacheflush hints. Use
hasChanged() to find out if the current node has been updated. Use
addCachFlushHint(CacheFlushHint) to add hints
public void setHtmlField(String htmlField)
public org.springframework.web.multipart.MultipartFile getFile()
public void setFile(org.springframework.web.multipart.MultipartFile file)
public String getId()
public void setId(String id)
protected boolean isNodeNullIllegal()
protected boolean shouldProcess(Node node)
node - the current node.protected abstract Node createNode(Transaction transaction, Map<String,Node> idMap, javax.servlet.http.HttpServletRequest request)
transaction - the mmmbase transactionrequest - protected void processNode(Transaction transaction)
node - resultContainer - protected final Locale getLocale()
protected final Node getNode()
protected final void setChanged()
protected final boolean hasChanged()
protected final void addFieldError(String field, String key, String[] placeholderValues)
field - key - placeholderValues - protected final void addFieldError(String field, String key)
field - key - protected final void addFieldErrorTypeMessage(String field, String message)
field - message - protected final void addFieldErrorTypeValue(String field, String value)
field - value - protected final void addGlobalError(String key, String[] placeholderValues)
key - placeholderValues - protected final void addGlobalError(String key)
key - protected final void addCachFlushHint(CacheFlushHint hint)
protected abstract void createCacheFlushHints()
protected final boolean mayWrite(NodeManager nodeManager)
nodeManager - protected final boolean mayCreate(NodeManager nodeManager)
nodeManager - protected final boolean mayDelete(Node node)
nodeManager - protected final boolean hasErrors()
protected final void addNodeParam(String name)
MMBase 1.9-SNAPSHOT - ${javadoctimestamp}