edu.internet2.middleware.shibboleth.common.config.attribute.resolver.dataConnector
Class StoredIDDataConnectorBeanDefinitionParser

java.lang.Object
  extended by org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
      extended by org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
          extended by edu.internet2.middleware.shibboleth.common.config.attribute.resolver.AbstractResolutionPlugInBeanDefinitionParser
              extended by edu.internet2.middleware.shibboleth.common.config.attribute.resolver.dataConnector.BaseDataConnectorBeanDefinitionParser
                  extended by edu.internet2.middleware.shibboleth.common.config.attribute.resolver.dataConnector.StoredIDDataConnectorBeanDefinitionParser
All Implemented Interfaces:
org.springframework.beans.factory.xml.BeanDefinitionParser

public class StoredIDDataConnectorBeanDefinitionParser
extends BaseDataConnectorBeanDefinitionParser

Spring bean definition parser for stored ID data connector.


Field Summary
private  org.slf4j.Logger log
          Class logger.
static QName TYPE_NAME
          Schema type name.
 
Fields inherited from class edu.internet2.middleware.shibboleth.common.config.attribute.resolver.dataConnector.BaseDataConnectorBeanDefinitionParser
FAILOVER_DATA_CONNECTOR_ELEMENT_NAME
 
Fields inherited from class edu.internet2.middleware.shibboleth.common.config.attribute.resolver.AbstractResolutionPlugInBeanDefinitionParser
DEPENDENCY_ELEMENT_NAME
 
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE
 
Constructor Summary
StoredIDDataConnectorBeanDefinitionParser()
           
 
Method Summary
protected  DataSource buildApplicationManagedConnection(String pluginId, Element amc)
          Builds a JDBC DataSource from an ApplicationManagedConnection configuration element.
protected  DataSource buildContainerManagedConnection(String pluginId, Element cmc)
          Builds a JDBC DataSource from a ContainerManagedConnection configuration element.
protected  Hashtable<String,String> buildProperties(List<Element> propertyElements)
          Builds a hash from PropertyType elements.
protected  void doParse(String pluginId, Element pluginConfig, Map<QName,List<Element>> pluginConfigChildren, org.springframework.beans.factory.support.BeanDefinitionBuilder pluginBuilder, org.springframework.beans.factory.xml.ParserContext parserContext)
          Parses the plugin configuration.
protected  Class getBeanClass(Element element)
          
protected  void processConnectionManagement(String pluginId, Element pluginConfig, Map<QName,List<Element>> pluginConfigChildren, org.springframework.beans.factory.support.BeanDefinitionBuilder pluginBuilder, org.springframework.beans.factory.xml.ParserContext parserContext)
          Processes the connection management configuration.
 
Methods inherited from class edu.internet2.middleware.shibboleth.common.config.attribute.resolver.AbstractResolutionPlugInBeanDefinitionParser
doParse, parseDependencies, resolveId
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
doParse, getBeanClassName, getParentName, parseInternal
 
Methods inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
parse, postProcessComponentDefinition, registerBeanDefinition, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_NAME

public static final QName TYPE_NAME
Schema type name.


log

private final org.slf4j.Logger log
Class logger.

Constructor Detail

StoredIDDataConnectorBeanDefinitionParser

public StoredIDDataConnectorBeanDefinitionParser()
Method Detail

getBeanClass

protected Class getBeanClass(Element element)

Overrides:
getBeanClass in class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser

doParse

protected void doParse(String pluginId,
                       Element pluginConfig,
                       Map<QName,List<Element>> pluginConfigChildren,
                       org.springframework.beans.factory.support.BeanDefinitionBuilder pluginBuilder,
                       org.springframework.beans.factory.xml.ParserContext parserContext)
Parses the plugin configuration.

Overrides:
doParse in class BaseDataConnectorBeanDefinitionParser
Parameters:
pluginId - unique ID of the plugin
pluginConfig - root plugin configuration element
pluginConfigChildren - immediate children of the root configuration element (provided to save from having to reparse them)
pluginBuilder - bean definition builder for the plugin
parserContext - current parsing context

processConnectionManagement

protected void processConnectionManagement(String pluginId,
                                           Element pluginConfig,
                                           Map<QName,List<Element>> pluginConfigChildren,
                                           org.springframework.beans.factory.support.BeanDefinitionBuilder pluginBuilder,
                                           org.springframework.beans.factory.xml.ParserContext parserContext)
Processes the connection management configuration.

Parameters:
pluginId - ID of this data connector
pluginConfig - configuration element for this data connector
pluginConfigChildren - configuration elements for this connector
pluginBuilder - bean definition builder
parserContext - current configuration parsing context

buildContainerManagedConnection

protected DataSource buildContainerManagedConnection(String pluginId,
                                                     Element cmc)
Builds a JDBC DataSource from a ContainerManagedConnection configuration element.

Parameters:
pluginId - ID of this data connector
cmc - the container managed configuration element
Returns:
the built data source

buildApplicationManagedConnection

protected DataSource buildApplicationManagedConnection(String pluginId,
                                                       Element amc)
Builds a JDBC DataSource from an ApplicationManagedConnection configuration element.

Parameters:
pluginId - ID of this data connector
amc - the application managed configuration element
Returns:
the built data source

buildProperties

protected Hashtable<String,String> buildProperties(List<Element> propertyElements)
Builds a hash from PropertyType elements.

Parameters:
propertyElements - properties elements
Returns:
properties extracted from elements, key is the property name.


Copyright © 1999-2012. All Rights Reserved.