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 QName
BEAN_MANAGED_CONNECTION_RESOLVER
resolver:BeanManagedConnection.private Element
configElement
Data source XML element.static QName
CONTAINER_MANAGED_CONNECTION_RESOLVER
resolver:ContainerManagedConnection.private static org.slf4j.Logger
LOG
Logger.static QName
SIMPLE_MANAGED_CONNECTION_RESOLVER
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.
-
Field Details
-
CONTAINER_MANAGED_CONNECTION_RESOLVER
resolver:ContainerManagedConnection. -
BEAN_MANAGED_CONNECTION_RESOLVER
resolver:BeanManagedConnection. -
SIMPLE_MANAGED_CONNECTION_RESOLVER
resolver:SimpleManagedConnection. -
LOG
@Nonnull private static final org.slf4j.Logger LOGLogger. -
configElement
Data source XML element.
-
-
Constructor Details
-
ManagedConnectionParser
Creates a new ManagedConnectionParser with the supplied element.- Parameters:
config
- element
-
-
Method Details
-
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
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
Get the bean ID of an externally defined data source.- Parameters:
config
- the config element- Returns:
- data source bean ID
-