Package net.shibboleth.idp.attribute.resolver.spring.dc.impl

# Class ManagedConnectionParser

java.lang.Object
net.shibboleth.idp.attribute.resolver.spring.dc.impl.ManagedConnectionParser

public class ManagedConnectionParser extends Object
Utility class for parsing v2 managed connection configuration.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final QName`
`BEAN_MANAGED_CONNECTION`
resolver:BeanManagedConnection.
`private final Element`
`configElement`
Data source XML element.
`static final QName`
`CONTAINER_MANAGED_CONNECTION`
resolver:ContainerManagedConnection.
`private static final org.slf4j.Logger`
`LOG`
Logger.
`static final QName`
`SIMPLE_MANAGED_CONNECTION`
resolver:SimpleManagedConnection.

## Constructor Summary

Constructors
Constructor
Description
`ManagedConnectionParser(Element config)`
Creates a new ManagedConnectionParser with the supplied element.

## Method Summary

Modifier and Type
Method
Description
`static DataSource`
`buildDataSource(String resourceName)`
Factory builder a container managed datasource.
`protected BeanDefinition`
`createContainerManagedDataSource(Element containerManagedElement)`
Creates a container managed data source bean definition.
`BeanDefinition`
`createDataSource()`
Creates a data source bean definition from a v2 XML configuration.
`protected BeanDefinition`
`createSimpleManagedDataSource(Element simpleManagedElement)`
Creates an simple managed data source bean definition based on dbcp2.
`static String`
`getBeanDataSourceID(Element config)`
Get the bean ID of an externally defined data source.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### CONTAINER_MANAGED_CONNECTION

@Nonnull public static final QName CONTAINER_MANAGED_CONNECTION
resolver:ContainerManagedConnection.

### BEAN_MANAGED_CONNECTION

@Nonnull public static final QName BEAN_MANAGED_CONNECTION
resolver:BeanManagedConnection.

### SIMPLE_MANAGED_CONNECTION

@Nonnull public static final QName SIMPLE_MANAGED_CONNECTION
resolver:SimpleManagedConnection.

### LOG

@Nonnull private static final org.slf4j.Logger LOG
Logger.

### configElement

@Nonnull private final Element configElement
Data source XML element.

## Constructor Details

### ManagedConnectionParser

public ManagedConnectionParser(@Nonnull Element config)
Creates a new ManagedConnectionParser with the supplied element.

Parameters:
  `config` - element

## Method Details

### createDataSource

@Nullable public BeanDefinition createDataSource()
Creates a data source bean definition from a v2 XML configuration.

Returns:
  data source bean definition

### createContainerManagedDataSource

@Nonnull protected BeanDefinition createContainerManagedDataSource(@Nonnull Element containerManagedElement)
Creates a container managed data source bean definition.

Parameters:
  `containerManagedElement` - to parse
Returns:
  data source bean definition

### createSimpleManagedDataSource

@Nonnull protected BeanDefinition createSimpleManagedDataSource(@Nonnull Element simpleManagedElement)
Creates an simple managed data source bean definition based on dbcp2.

Parameters:
  `simpleManagedElement` - to parse
Returns:
  data source bean definition

### buildDataSource

@Nullable public static DataSource buildDataSource(String resourceName)
Factory builder a container managed datasource.

Parameters:
  `resourceName` - of the data source
Returns:
  data source or null if the data source cannot be looked up

### getBeanDataSourceID

@Nullable public static String getBeanDataSourceID(@Nonnull Element config)
Get the bean ID of an externally defined data source.

Parameters:
  `config` - the config element
Returns:
  data source bean ID