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 Details

    • 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 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