org.apache.geronimo.blueprint.compendium.cm
Class CmNamespaceHandler

java.lang.Object
  extended by org.apache.geronimo.blueprint.compendium.cm.CmNamespaceHandler
All Implemented Interfaces:
NamespaceHandler

public class CmNamespaceHandler
extends Object
implements NamespaceHandler

Namespace handler for the Config Admin service. This handler will parse the various elements defined and populate / modify the registry accordingly.

Version:
$Rev: 766508 $, $Date: 2009-04-19 22:09:27 +0200 (Sun, 19 Apr 2009) $
Author:
Apache Geronimo Project
See Also:
CmManagedProperties, CmManagedServiceFactory, CmProperties, CmPropertyPlaceholder

Field Summary
static String AUTO_EXPORT_ALL
           
static String AUTO_EXPORT_ATTRIBUTE
           
static String AUTO_EXPORT_CLASS_HIERARCHY
           
static String AUTO_EXPORT_DEFAULT
           
static String AUTO_EXPORT_DISABLED
           
static String AUTO_EXPORT_INTERFACES
           
static String BLUEPRINT_CM_NAMESPACE
           
static String BLUEPRINT_NAMESPACE
           
static String CM_PROPERTIES_ELEMENT
           
static String DEFAULT_PROPERTIES_ELEMENT
           
static String DEFAULTS_REF_ATTRIBUTE
           
static String FACTORY_PID_ATTRIBUTE
           
static String ID_ATTRIBUTE
           
static String INTERFACE_ATTRIBUTE
           
static String INTERFACES_ELEMENT
           
static String MANAGED_COMPONENT_ELEMENT
           
static String MANAGED_PROPERTIES_ELEMENT
           
static String MANAGED_SERVICE_FACTORY_ELEMENT
           
static String PERSISTENT_ID_ATTRIBUTE
           
static String PLACEHOLDER_PREFIX_ATTRIBUTE
           
static String PLACEHOLDER_SUFFIX_ATTRIBUTE
           
static String PROPERTY_ELEMENT
           
static String PROPERTY_PLACEHOLDER_ELEMENT
           
static String RANKING_ATTRIBUTE
           
static String RANKING_DEFAULT
           
static String UPDATE_ATTRIBUTE
           
static String UPDATE_METHOD_ATTRIBUTE
           
static String UPDATE_STRATEGY_ATTRIBUTE
           
static String VALUE_ELEMENT
           
 
Constructor Summary
CmNamespaceHandler()
           
 
Method Summary
 ComponentMetadata decorate(Node node, ComponentMetadata component, ParserContext context)
           
 void generateIdIfNeeded(ParserContext context, MutableComponentMetadata metadata)
           
static org.osgi.service.cm.ConfigurationAdmin getConfigAdmin()
           
 String getId(ParserContext context, Element element)
           
 int getIdCounter()
           
 URL getSchemaLocation(String namespace)
           
static boolean isBlueprintNamespace(String ns)
           
 Metadata parse(Element element, ParserContext context)
           
 List<String> parseInterfaceNames(Element element)
           
 void setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)
           
 void setIdCounter(int idCounter)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BLUEPRINT_NAMESPACE

public static final String BLUEPRINT_NAMESPACE
See Also:
Constant Field Values

BLUEPRINT_CM_NAMESPACE

public static final String BLUEPRINT_CM_NAMESPACE
See Also:
Constant Field Values

PROPERTY_PLACEHOLDER_ELEMENT

public static final String PROPERTY_PLACEHOLDER_ELEMENT
See Also:
Constant Field Values

MANAGED_PROPERTIES_ELEMENT

public static final String MANAGED_PROPERTIES_ELEMENT
See Also:
Constant Field Values

MANAGED_SERVICE_FACTORY_ELEMENT

public static final String MANAGED_SERVICE_FACTORY_ELEMENT
See Also:
Constant Field Values

CM_PROPERTIES_ELEMENT

public static final String CM_PROPERTIES_ELEMENT
See Also:
Constant Field Values

DEFAULT_PROPERTIES_ELEMENT

public static final String DEFAULT_PROPERTIES_ELEMENT
See Also:
Constant Field Values

PROPERTY_ELEMENT

public static final String PROPERTY_ELEMENT
See Also:
Constant Field Values

INTERFACES_ELEMENT

public static final String INTERFACES_ELEMENT
See Also:
Constant Field Values

VALUE_ELEMENT

public static final String VALUE_ELEMENT
See Also:
Constant Field Values

MANAGED_COMPONENT_ELEMENT

public static final String MANAGED_COMPONENT_ELEMENT
See Also:
Constant Field Values

ID_ATTRIBUTE

public static final String ID_ATTRIBUTE
See Also:
Constant Field Values

PERSISTENT_ID_ATTRIBUTE

public static final String PERSISTENT_ID_ATTRIBUTE
See Also:
Constant Field Values

PLACEHOLDER_PREFIX_ATTRIBUTE

public static final String PLACEHOLDER_PREFIX_ATTRIBUTE
See Also:
Constant Field Values

PLACEHOLDER_SUFFIX_ATTRIBUTE

public static final String PLACEHOLDER_SUFFIX_ATTRIBUTE
See Also:
Constant Field Values

DEFAULTS_REF_ATTRIBUTE

public static final String DEFAULTS_REF_ATTRIBUTE
See Also:
Constant Field Values

UPDATE_STRATEGY_ATTRIBUTE

public static final String UPDATE_STRATEGY_ATTRIBUTE
See Also:
Constant Field Values

UPDATE_METHOD_ATTRIBUTE

public static final String UPDATE_METHOD_ATTRIBUTE
See Also:
Constant Field Values

FACTORY_PID_ATTRIBUTE

public static final String FACTORY_PID_ATTRIBUTE
See Also:
Constant Field Values

AUTO_EXPORT_ATTRIBUTE

public static final String AUTO_EXPORT_ATTRIBUTE
See Also:
Constant Field Values

RANKING_ATTRIBUTE

public static final String RANKING_ATTRIBUTE
See Also:
Constant Field Values

INTERFACE_ATTRIBUTE

public static final String INTERFACE_ATTRIBUTE
See Also:
Constant Field Values

UPDATE_ATTRIBUTE

public static final String UPDATE_ATTRIBUTE
See Also:
Constant Field Values

AUTO_EXPORT_DISABLED

public static final String AUTO_EXPORT_DISABLED
See Also:
Constant Field Values

AUTO_EXPORT_INTERFACES

public static final String AUTO_EXPORT_INTERFACES
See Also:
Constant Field Values

AUTO_EXPORT_CLASS_HIERARCHY

public static final String AUTO_EXPORT_CLASS_HIERARCHY
See Also:
Constant Field Values

AUTO_EXPORT_ALL

public static final String AUTO_EXPORT_ALL
See Also:
Constant Field Values

AUTO_EXPORT_DEFAULT

public static final String AUTO_EXPORT_DEFAULT
See Also:
Constant Field Values

RANKING_DEFAULT

public static final String RANKING_DEFAULT
See Also:
Constant Field Values
Constructor Detail

CmNamespaceHandler

public CmNamespaceHandler()
Method Detail

getIdCounter

public int getIdCounter()

setIdCounter

public void setIdCounter(int idCounter)

getConfigAdmin

public static org.osgi.service.cm.ConfigurationAdmin getConfigAdmin()

setConfigAdmin

public void setConfigAdmin(org.osgi.service.cm.ConfigurationAdmin configAdmin)

getSchemaLocation

public URL getSchemaLocation(String namespace)
Specified by:
getSchemaLocation in interface NamespaceHandler

parse

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

decorate

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

isBlueprintNamespace

public static boolean isBlueprintNamespace(String ns)

getId

public String getId(ParserContext context,
                    Element element)

generateIdIfNeeded

public void generateIdIfNeeded(ParserContext context,
                               MutableComponentMetadata metadata)

parseInterfaceNames

public List<String> parseInterfaceNames(Element element)


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