| java.lang.Object org.nanocontainer.script.groovy.buildernodes.AbstractBuilderNode
All known Subclasses: org.nanocontainer.webcontainer.groovy.WebContainerBuilder, org.nanocontainer.script.groovy.buildernodes.DecoratingPicoContainerNode, org.nanocontainer.script.groovy.buildernodes.ClasspathNode, org.nanocontainer.script.groovy.buildernodes.GrantNode, org.nanocontainer.script.groovy.buildernodes.ClassLoaderNode, org.nanocontainer.script.groovy.buildernodes.AppendContainerNode, org.nanocontainer.script.groovy.buildernodes.DoCallNode, org.nanocontainer.script.groovy.buildernodes.BeanNode, org.nanocontainer.script.groovy.buildernodes.ChildContainerNode, org.nanocontainer.script.groovy.buildernodes.NewBuilderNode, org.nanocontainer.script.groovy.buildernodes.ComponentNode,
AbstractBuilderNode | abstract public class AbstractBuilderNode implements BuilderNode,Serializable(Code) | | Abstract base class for custom nodes. Also provides basic services and
construction capabilities.
author: James Strachan author: Paul Hammant author: Aslak Hellesøy author: Michael Rimov author: Mauro Talevi version: $Revision: 2443 $ |
AbstractBuilderNode | public AbstractBuilderNode(String nodeName)(Code) | | Constructs a custom node builder. In derived classes you would
typically create a default constructor and call addPossibleParent()/addAttribute()
to customize the validation capabilities of the Node.
Parameters: nodeName - the name of the node we're constructing. |
addAttribute | protected AbstractBuilderNode addAttribute(String name)(Code) | | Add an attribute to the list of ones supported by this node.
Parameters: name - String the name of the attribute we support. AbstractBuilderNode (this) to allow for method chaining. |
getSupportedAttributes | public Set getSupportedAttributes()(Code) | | |
isAttribute | protected boolean isAttribute(Map attributes, String key)(Code) | | Checks that an attribute actually exists in the attirbute map. (The key
exists and the value is non-null)
Parameters: attributes - Map the current node's attributes. Parameters: key - String the attribute key we're looking for. boolean true if the attribute exists for the current node. |
validateScriptedAttributes | public void validateScriptedAttributes(Map specifiedAttributes) throws NanoContainerMarkupException(Code) | | This particular implementation checks all specified attribute keynames
against the names supported in the node type. It does not type checking
against the values passed in via the attributes.
Parameters: specifiedAttributes - the attributes as passed in by the groovyscript. throws: NanoContainerMarkupException - if an attribute is specified thatis not recognized. |
|
|