org.picocontainer.script.groovy.nodes
Class ConfigNode
java.lang.Object
org.picocontainer.script.groovy.nodes.AbstractBuilderNode
org.picocontainer.script.groovy.nodes.ConfigNode
- All Implemented Interfaces:
- Serializable, BuilderNode
public class ConfigNode
- extends AbstractBuilderNode
Config node adds configuration entry to mutable pico container. It requires two
named parameters: key and value. Example usage
config(key:'foo',value:'bar')
- Author:
- k.pribluda
- See Also:
- Serialized Form
NODE_NAME
public static final String NODE_NAME
- See Also:
- Constant Field Values
KEY
public static final String KEY
- attribute name for key attribute ( Required )
- See Also:
- Constant Field Values
VALUE
public static final String VALUE
- attribute name for value attribute ( Required )
- See Also:
- Constant Field Values
ConfigNode
public ConfigNode()
createNewNode
public Object createNewNode(Object current,
Map<String,Object> attributes)
- Description copied from interface:
BuilderNode
- Creates a new node .
- Parameters:
current
- the current Object - may be null
for no
parent container.attributes
- the Map of scripted attributes for the builder node -
may be null
- Returns:
- The newly created node
validateScriptedAttributes
public void validateScriptedAttributes(Map<String,Object> specifiedAttributes)
throws ScriptedPicoContainerMarkupException
- ansure that node has proper attributes
- Specified by:
validateScriptedAttributes
in interface BuilderNode
- Overrides:
validateScriptedAttributes
in class AbstractBuilderNode
- Parameters:
specifiedAttributes
- the attributes as passed in by the groovy
script.
- Throws:
ScriptedPicoContainerMarkupException
- if an attribute is specified
that is not recognized.
Copyright © 2003-2010 Codehaus. All Rights Reserved.