Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.nanocontainer.script.groovy
Interface BuilderNode

All Known Implementing Classes:
  AbstractBuilderNode, AppendContainerNode, BeanNode, ChildContainerNode, ClassLoaderNode, ClasspathNode, ComponentNode, DecoratingPicoContainerNode, DoCallNode, GrantNode, NewBuilderNode

    public interface BuilderNode

In a groovy node builder environment, there is often one class per node that is possible in a builder. This interface provides the necessary validation and interaction methods for the mediator (The GroovyNodeBuilder object) to figure out who should handle what.

Version:
  1.0
Author:
  Michael Rimov

Method Summary
`Object` | `createNewNode(Object current, Map attributes)` Execute the handler for the given node builder.
`String` | `getNodeName()` Retrieve the name of the node.
`Set` | `getSupportedAttributes()` Retrieve a map of supported attribute names.
`void` | `validateScriptedAttributes(Map specifiedAttributes)` Validates a given map of attributes as supplied by the GroovyNodeBuilder against the node's supported attributes.

Method Detail

### getNodeName

    String getNodeName()

  Retrieve the name of the node. Examples could be 'container' or 'component'.

  Returns:
    String

### getSupportedAttributes

    Set getSupportedAttributes()

  Retrieve a map of supported attribute names.

  note:Supported attributes are currently unverified by the GroovyNodeBuilder as this would result in a change of behavior.

  Returns:
    Set of Strings.

### validateScriptedAttributes

    void validateScriptedAttributes(Map specifiedAttributes)
                                    throws org.nanocontainer.script.NanoContainerMarkupException

  Validates a given map of attributes as supplied by the GroovyNodeBuilder against the node's supported attributes.

  Parameters:
    `specifiedAttributes` - Map
  Throws:
    `org.nanocontainer.script.NanoContainerMarkupException`

### createNewNode

    Object createNewNode(Object current,
                         Map attributes)
                         throws org.nanocontainer.script.NanoContainerMarkupException

  Execute the handler for the given node builder.

  Parameters:
    `current` - the current object. May be null for no parent container.
    `attributes` - Map attributes specified in the groovy script for the builder node. in for consistency with the Groovy Builder API. Normally set to null.
  Returns:
    Object
  Throws:
    `org.nanocontainer.script.NanoContainerMarkupException` - upon Nanocontainer error.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2007 Codehaus. All Rights Reserved.