Class AbstractDataConnectorParser
java.lang.Object
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
net.shibboleth.ext.spring.util.AbstractCustomBeanDefinitionParser
net.shibboleth.idp.attribute.resolver.spring.BaseResolverPluginParser
net.shibboleth.idp.attribute.resolver.spring.dc.AbstractDataConnectorParser
- All Implemented Interfaces:
BeanDefinitionParser
- Direct Known Subclasses:
HTTPDataConnectorParser
,LDAPDataConnectorParser
,RDBMSDataConnectorParser
,ScriptDataConnectorParser
,StaticDataConnectorParser
,StorageServiceDataConnectorParser
,SubjectDataConnectorParser
Base spring bean definition parser for data connectors. DataConnector implementations should provide a custom
BeanDefinitionParser by extending this class and overriding the
doParse(Element, ParserContext, BeanDefinitionBuilder)
method to parse any additional attributes or elements
it requires. Standard attributes and elements defined by the ResolutionPlugIn and DataConnector schemas will
automatically attempt to be parsed.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Whether to export all attributes.static final String
Which attributes to export.static final String
static final String
Failfast LDAP, Realtional, Stored.static final String
Delay in retrying failed connector.static final String
static final String
semi colon separated resources to indicate external config.static final String
static final QName
Element name.static final QName
Failover data connector attribute name.private final org.slf4j.Logger
Log4j logger.Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
doParse
(Element config, ParserContext parserContext, BeanDefinitionBuilder builder) protected abstract void
doV2Parse
(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Parse the suppliedElement
as a legacy format and populate the suppliedBeanDefinitionBuilder
as required.protected final Class<?>
getBeanClass
(Element element) protected String
Return a string which is to be prepended to all log messages.protected abstract Class<? extends AbstractDataConnector>
Per parser indication of what we are building.protected boolean
Returns whether the element configuration is native spring or custom.Methods inherited from class net.shibboleth.idp.attribute.resolver.spring.BaseResolverPluginParser
failOnDependencies, getActivationCondition, getDefinitionId, warnOnDependencies
Methods inherited from class net.shibboleth.ext.spring.util.AbstractCustomBeanDefinitionParser
registerBeanDefinition
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, resolveId, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback, shouldParseNameAsAliases
-
Field Details
-
ELEMENT_NAME
Element name. -
ATTR_NORETRYDELAY
Delay in retrying failed connector.- See Also:
-
ATTR_SPRING_RESOURCE
semi colon separated resources to indicate external config.- See Also:
-
ATTR_SPRING_RESOURCE_REF
- See Also:
-
ATTR_FACTORY_POSTPROCESSORS_REF
- See Also:
-
ATTR_POSTPROCESSORS_REF
- See Also:
-
ATTR_EXPORT_ALL
Whether to export all attributes.- See Also:
-
ATTR_EXPORT_NAMES
Which attributes to export.- See Also:
-
ATTR_FAIL_FAST
Failfast LDAP, Realtional, Stored.- See Also:
-
FAILOVER_DATA_CONNECTOR_ELEMENT_NAME
Failover data connector attribute name. -
log
@Nonnull private final org.slf4j.Logger logLog4j logger.
-
-
Constructor Details
-
AbstractDataConnectorParser
public AbstractDataConnectorParser()
-
-
Method Details
-
isNative
Returns whether the element configuration is native spring or custom.- Parameters:
config
- the element under consideration.- Returns:
- whether this is native spring
-
getBeanClass
- Overrides:
getBeanClass
in classAbstractSingleBeanDefinitionParser
-
getNativeBeanClass
Per parser indication of what we are building.- Returns:
- the class
-
doParse
protected void doParse(@Nonnull Element config, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder) - Overrides:
doParse
in classBaseResolverPluginParser
-
doV2Parse
protected abstract void doV2Parse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Parse the suppliedElement
as a legacy format and populate the suppliedBeanDefinitionBuilder
as required.- Parameters:
element
- the XML element being parsedparserContext
- the object encapsulating the current state of the parsing processbuilder
- used to define theBeanDefinition
- See Also:
-
getLogPrefix
Return a string which is to be prepended to all log messages.- Overrides:
getLogPrefix
in classBaseResolverPluginParser
- Returns:
- "Data Connector: '<definitionID>' :"
-