org.apache.aries.jpa.blueprint.aries.impl
Class NSHandler

java.lang.Object
  extended by org.apache.aries.jpa.blueprint.aries.impl.NSHandler
All Implemented Interfaces:
org.apache.aries.blueprint.NamespaceHandler

public class NSHandler
extends Object
implements org.apache.aries.blueprint.NamespaceHandler

This class handles the JPA namespace in blueprint xml files, it configures injection for managed persistence units and managed persistence contexts. The namespace handler also registers clients of managed persistence contexts with the GlobalPersistenceManager.


Field Summary
static String EMPTY_UNIT_NAME_FILTER
          A filter to find persistence units that specify an empty name
static String NS_URI_100
          The JPA 1.0.0 namespace
static String NS_URI_110
          The JPA 1.0.0 namespace
 
Constructor Summary
NSHandler()
           
 
Method Summary
 void contextAvailable(org.osgi.framework.ServiceReference ref)
          Called when a PersistenceContextProvider is available
 void contextUnavailable(org.osgi.framework.ServiceReference ref)
          Called when a PersistenceContextProvider is no longer available
 org.osgi.service.blueprint.reflect.ComponentMetadata decorate(Node node, org.osgi.service.blueprint.reflect.ComponentMetadata component, org.apache.aries.blueprint.ParserContext context)
          Called by blueprint when we meet a JPA namespace element
 Set<Class> getManagedClasses()
           
 URL getSchemaLocation(String namespace)
           
 org.osgi.service.blueprint.reflect.Metadata parse(Element element, org.apache.aries.blueprint.ParserContext context)
           
 void setManager(PersistenceContextProvider manager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NS_URI_100

public static final String NS_URI_100
The JPA 1.0.0 namespace

See Also:
Constant Field Values

NS_URI_110

public static final String NS_URI_110
The JPA 1.0.0 namespace

See Also:
Constant Field Values

EMPTY_UNIT_NAME_FILTER

public static final String EMPTY_UNIT_NAME_FILTER
A filter to find persistence units that specify an empty name

See Also:
Constant Field Values
Constructor Detail

NSHandler

public NSHandler()
Method Detail

setManager

public void setManager(PersistenceContextProvider manager)

decorate

public org.osgi.service.blueprint.reflect.ComponentMetadata decorate(Node node,
                                                                     org.osgi.service.blueprint.reflect.ComponentMetadata component,
                                                                     org.apache.aries.blueprint.ParserContext context)
Called by blueprint when we meet a JPA namespace element

Specified by:
decorate in interface org.apache.aries.blueprint.NamespaceHandler

getManagedClasses

public Set<Class> getManagedClasses()
Specified by:
getManagedClasses in interface org.apache.aries.blueprint.NamespaceHandler

getSchemaLocation

public URL getSchemaLocation(String namespace)
Specified by:
getSchemaLocation in interface org.apache.aries.blueprint.NamespaceHandler

parse

public org.osgi.service.blueprint.reflect.Metadata parse(Element element,
                                                         org.apache.aries.blueprint.ParserContext context)
Specified by:
parse in interface org.apache.aries.blueprint.NamespaceHandler

contextAvailable

public void contextAvailable(org.osgi.framework.ServiceReference ref)
Called when a PersistenceContextProvider is available

Parameters:
ref -

contextUnavailable

public void contextUnavailable(org.osgi.framework.ServiceReference ref)
Called when a PersistenceContextProvider is no longer available

Parameters:
ref -


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