|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mmbase.applications.vprowizards.spring.action.Action
org.mmbase.applications.vprowizards.spring.action.AbstractNodeAction
public abstract class AbstractNodeAction
this is a template class for the 'real' node actions
Is it more or less a redo of org.mmbase.datatypes.handler.html
| Field Summary | |
|---|---|
protected String |
securityContext
|
| Constructor Summary | |
|---|---|
AbstractNodeAction()
|
|
| Method Summary | |
|---|---|
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 |
addFieldErrorTypeMessage(String field,
Throwable e)
|
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 |
addGlobalError(String key,
String[] placeholderValues,
Throwable t)
|
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,
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)
|
void |
setSecurityContext(String c)
|
protected boolean |
shouldProcess(Node node)
this template method is called before any changes are made to the node to edit. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected String securityContext
| Constructor Detail |
|---|
public AbstractNodeAction()
| Method Detail |
|---|
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
process in class Action
XNIExceptionpublic void setHtmlField(String htmlField)
public Map<String,DateTime> getDateFields()
public void setDateFields(Map<String,DateTime> dateFields)
public Map<String,String> getFields()
public void setFields(Map<String,String> fields)
public void setSecurityContext(String c)
public org.springframework.web.multipart.MultipartFile getFile()
public void setFile(org.springframework.web.multipart.MultipartFile file)
public String getId()
public void setId(String id)
public String toString()
toString in class Objectprotected boolean isNodeNullIllegal()
protected boolean shouldProcess(Node node)
node - the current node.
protected abstract Node createNode(Transaction transaction,
Map<String,Node> idMap,
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 addFieldErrorTypeMessage(String field,
Throwable e)
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,
String[] placeholderValues,
Throwable t)
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)
protected final void addParam(String name,
String value)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||