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,PairwiseIdDataConnectorParser,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 StringWhether to export all attributes.static final StringWhich attributes to export.static final Stringstatic final StringFailfast LDAP, Realtional, Stored.static final StringDelay in retrying failed connector.static final Stringstatic final Stringsemi colon separated resources to indicate external config.static final Stringstatic final QNameElement name.static final QNameFailover data connector attribute name.private final org.slf4j.LoggerLog4j logger.Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoParse(Element config, ParserContext parserContext, BeanDefinitionBuilder builder) protected abstract voiddoV2Parse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Parse the suppliedElementas a legacy format and populate the suppliedBeanDefinitionBuilderas required.protected final Class<?>getBeanClass(Element element) protected StringReturn 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 booleanReturns whether the element configuration is native spring or custom.Methods inherited from class net.shibboleth.idp.attribute.resolver.spring.BaseResolverPluginParser
failOnDependencies, getActivationCondition, getDefinitionId, warnOnDependenciesMethods inherited from class net.shibboleth.ext.spring.util.AbstractCustomBeanDefinitionParser
registerBeanDefinitionMethods inherited from class org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
doParse, getBeanClassName, getParentName, parseInternalMethods 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:
getBeanClassin 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:
doParsein classBaseResolverPluginParser
-
doV2Parse
protected abstract void doV2Parse(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Parse the suppliedElementas a legacy format and populate the suppliedBeanDefinitionBuilderas 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:
getLogPrefixin classBaseResolverPluginParser- Returns:
- "Data Connector: '<definitionID>' :"
-