org.apache.aries.blueprint.testbundlea
Class NSHandlerOne

java.lang.Object
  extended by org.apache.aries.blueprint.testbundlea.NSHandlerOne
All Implemented Interfaces:
NamespaceHandler

public class NSHandlerOne
extends java.lang.Object
implements NamespaceHandler

A simple example namespace handler, that understands an element, and 2 attributes When the element is encountered in a top level blueprint element, the handler will add a passthroughmetadata with it's id as the contained attribone. The passthroughmetadata will return a string with the value from the contained attrib two. If the element is encountered during processing of a bean, it will add a property to the bean with the name of the attribone value, and a value of the passthroughmetadata with id matching attribtwo This handler is designed to exercise aspects of the NamespaceHandler capability set.


Field Summary
static java.lang.String NSURI
           
 
Constructor Summary
NSHandlerOne()
           
 
Method Summary
 ComponentMetadata decorate(org.w3c.dom.Node node, ComponentMetadata component, ParserContext context)
           
 java.util.Set<java.lang.Class> getManagedClasses()
           
 java.net.URL getSchemaLocation(java.lang.String namespace)
           
 Metadata parse(org.w3c.dom.Element element, ParserContext context)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NSURI

public static java.lang.String NSURI
Constructor Detail

NSHandlerOne

public NSHandlerOne()
Method Detail

decorate

public ComponentMetadata decorate(org.w3c.dom.Node node,
                                  ComponentMetadata component,
                                  ParserContext context)
Specified by:
decorate in interface NamespaceHandler

parse

public Metadata parse(org.w3c.dom.Element element,
                      ParserContext context)
Specified by:
parse in interface NamespaceHandler

getSchemaLocation

public java.net.URL getSchemaLocation(java.lang.String namespace)
Specified by:
getSchemaLocation in interface NamespaceHandler

getManagedClasses

public java.util.Set<java.lang.Class> getManagedClasses()
Specified by:
getManagedClasses in interface NamespaceHandler


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.