|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.nanocontainer.script.groovy.buildernodes.AbstractBuilderNode
public abstract class AbstractBuilderNode
Abstract base class for custom nodes. Also provides basic services and construction capabilities.
Constructor Summary | |
---|---|
AbstractBuilderNode(String nodeName)
Constructs a custom node builder. |
Method Summary | |
---|---|
protected AbstractBuilderNode |
addAttribute(String name)
Add an attribute to the list of ones supported by this node. |
String |
getNodeName()
Retrieve the name of the node. |
Set |
getSupportedAttributes()
Retrieve a map of supported attribute names. |
protected boolean |
isAttribute(Map attributes,
String key)
Checks that an attribute actually exists in the attirbute map. |
String |
toString()
|
void |
validateScriptedAttributes(Map specifiedAttributes)
Validates a given map of attributes as supplied by the GroovyNodeBuilder against the node's supported attributes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.nanocontainer.script.groovy.BuilderNode |
---|
createNewNode |
Constructor Detail |
---|
public AbstractBuilderNode(String nodeName)
nodeName
- the name of the node we're constructing.Method Detail |
---|
protected AbstractBuilderNode addAttribute(String name)
name
- String the name of the attribute we support.
public String getNodeName()
BuilderNode
getNodeName
in interface BuilderNode
public Set getSupportedAttributes()
BuilderNode
note:Supported attributes are currently unverified by the GroovyNodeBuilder as this would result in a change of behavior.
getSupportedAttributes
in interface BuilderNode
public String toString()
toString
in class Object
protected boolean isAttribute(Map attributes, String key)
attributes
- Map the current node's attributes.key
- String the attribute key we're looking for.
public void validateScriptedAttributes(Map specifiedAttributes) throws org.nanocontainer.script.NanoContainerMarkupException
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.
validateScriptedAttributes
in interface BuilderNode
specifiedAttributes
- the attributes as passed in by the groovy
script.
org.nanocontainer.script.NanoContainerMarkupException
- if an attribute is specified that
is not recognized.
|
![]() |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |