org.mmbase.applications.vprowizards.spring.action
Class CreateNodeAction

java.lang.Object
  extended by org.mmbase.applications.vprowizards.spring.action.Action
      extended by org.mmbase.applications.vprowizards.spring.action.AbstractNodeAction
          extended by org.mmbase.applications.vprowizards.spring.action.CreateNodeAction

public class CreateNodeAction
extends AbstractNodeAction

This action will create a node of the type that you set in the field 'nodemanager'

Author:
Ernst Bunders

Field Summary
 
Fields inherited from class org.mmbase.applications.vprowizards.spring.action.AbstractNodeAction
securityContext
 
Constructor Summary
CreateNodeAction()
           
 
Method Summary
protected  void createCacheFlushHints()
          This template method is called when the node to edit is changed.
protected  Node createNode(Transaction transaction, Map<String,Node> idMap, HttpServletRequest request)
          This template method is called to obtain the node for this action.
 String getNodeType()
           
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  NodeManager resolveNodemanager(Transaction transaction)
          This is the default implementation for creating new nodes.
 void setNodeAsParam(String paramName)
           
 void setNodeType(String nodemanger)
           
 
Methods inherited from class org.mmbase.applications.vprowizards.spring.action.AbstractNodeAction
addCachFlushHint, addFieldError, addFieldError, addFieldErrorTypeMessage, addFieldErrorTypeMessage, addFieldErrorTypeValue, addGlobalError, addGlobalError, addGlobalError, addNodeParam, addParam, getDateFields, getFields, getFile, getId, getLocale, getNode, hasChanged, hasErrors, isNodeNullIllegal, mayCreate, mayDelete, mayWrite, process, setChanged, setDateFields, setFields, setFile, setHtmlField, setId, setSecurityContext, shouldProcess, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateNodeAction

public CreateNodeAction()
Method Detail

setNodeType

public final void setNodeType(String nodemanger)

setNodeAsParam

public final void setNodeAsParam(String paramName)

getNodeType

public final String getNodeType()

createCacheFlushHints

protected final void createCacheFlushHints()
Description copied from class: AbstractNodeAction
This template method is called when the node to edit is changed. custom cachflush hints can be set here. This class dous not know if the current node is updated or created, so it dousn't know what kind of events to create.

Specified by:
createCacheFlushHints in class AbstractNodeAction

createNode

protected final Node createNode(Transaction transaction,
                                Map<String,Node> idMap,
                                HttpServletRequest request)
Description copied from class: AbstractNodeAction
This template method is called to obtain the node for this action. it is the responsibility of the implementation of this method to set a global error (using addGlobalError) when something goes wrong. In that case the action stops.

Specified by:
createNode in class AbstractNodeAction
Parameters:
transaction - the mmmbase transaction
Returns:
the node this action should handle or null if an error occurs

processNode

protected void processNode(Transaction transaction)
Description copied from class: AbstractNodeAction
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. The default implementation does nothing

Overrides:
processNode in class AbstractNodeAction

resolveNodemanager

protected NodeManager resolveNodemanager(Transaction transaction)
This is the default implementation for creating new nodes. Override this if the node manager has to be derived in a different way.

Returns:
the node manager used to create a new node with


MMBase 2.0-SNAPSHOT - null