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 QNameBEAN_MANAGED_CONNECTION_RESOLVERresolver:BeanManagedConnection.private ElementconfigElementData source XML element.static QNameCONTAINER_MANAGED_CONNECTION_RESOLVERresolver:ContainerManagedConnection.private static org.slf4j.LoggerLOGLogger.static QNameSIMPLE_MANAGED_CONNECTION_RESOLVERresolver:SimpleManagedConnection.
-
Constructor Summary
Constructors Constructor Description ManagedConnectionParser(Element config)Creates a new ManagedConnectionParser with the supplied element.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static DataSourcebuildDataSource(String resourceName)Factory builder a container managed datasource.protected BeanDefinitioncreateContainerManagedDataSource(Element containerManagedElement)Creates a container managed data source bean definition.BeanDefinitioncreateDataSource()Creates a data source bean definition from a v2 XML configuration.protected BeanDefinitioncreateSimpleManagedDataSource(Element simpleManagedElement)Creates an simple managed data source bean definition based on dbcp2.static StringgetBeanDataSourceID(Element config)Get the bean ID of an externally defined data source.
-
-
-
Field Detail
-
CONTAINER_MANAGED_CONNECTION_RESOLVER
@Nonnull public static final QName CONTAINER_MANAGED_CONNECTION_RESOLVER
resolver:ContainerManagedConnection.
-
BEAN_MANAGED_CONNECTION_RESOLVER
@Nonnull public static final QName BEAN_MANAGED_CONNECTION_RESOLVER
resolver:BeanManagedConnection.
-
SIMPLE_MANAGED_CONNECTION_RESOLVER
@Nonnull public static final QName SIMPLE_MANAGED_CONNECTION_RESOLVER
resolver:SimpleManagedConnection.
-
LOG
@Nonnull private static final org.slf4j.Logger LOG
Logger.
-
configElement
@Nonnull private final Element configElement
Data source XML element.
-
-
Constructor Detail
-
ManagedConnectionParser
public ManagedConnectionParser(@Nonnull Element config)Creates a new ManagedConnectionParser with the supplied element.- Parameters:
config- element
-
-
Method Detail
-
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
-
-