Class BaseAttributeEncoderParser
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.enc.BaseAttributeEncoderParser
- All Implemented Interfaces:
BeanDefinitionParser
- Direct Known Subclasses:
BaseSAML1AttributeEncoderParser
,BaseSAML2AttributeEncoderParser
public abstract class BaseAttributeEncoderParser extends AbstractCustomBeanDefinitionParser
Base class for Spring bean definition parser for attribute encoders.
-
Field Summary
Fields Modifier and Type Field Description private org.slf4j.Logger
log
Log4j logger.static String
NAME_ATTRIBUTE_NAME
Local name of name attribute.Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE
-
Constructor Summary
Constructors Constructor Description BaseAttributeEncoderParser()
-
Method Summary
Modifier and Type Method Description protected abstract BeanReference
buildTranscoder()
Return a bean definition for the transcoder to include in the mapping.protected abstract void
doParse(Element config, ParserContext parserContext, Map<String,Object> rule)
Inject any necessary elements into the mapping rule based on the specific encoder type.protected void
doParse(Element config, ParserContext context, BeanDefinitionBuilder builder)
protected Class<TranscodingRule>
getBeanClass(Element element)
private void
processLocalizedElement(List<Element> elements, ManagedMap<String,Object> rule, String propertyPrefix)
Used to process string elements that contain an xml:lang attribute expressing localization.protected boolean
shouldGenerateId()
protected boolean
shouldParseNameAsAliases()
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, shouldGenerateIdAsFallback
-
Field Details
-
NAME_ATTRIBUTE_NAME
Local name of name attribute.- See Also:
- Constant Field Values
-
log
@Nonnull private final org.slf4j.Logger logLog4j logger.
-
-
Constructor Details
-
BaseAttributeEncoderParser
public BaseAttributeEncoderParser()
-
-
Method Details
-
getBeanClass
- Overrides:
getBeanClass
in classAbstractSingleBeanDefinitionParser
-
shouldGenerateId
protected boolean shouldGenerateId()- Overrides:
shouldGenerateId
in classAbstractBeanDefinitionParser
-
shouldParseNameAsAliases
protected boolean shouldParseNameAsAliases()- Overrides:
shouldParseNameAsAliases
in classAbstractBeanDefinitionParser
-
doParse
- Overrides:
doParse
in classAbstractSingleBeanDefinitionParser
-
doParse
protected abstract void doParse(@Nonnull Element config, @Nonnull ParserContext parserContext, @Nonnull Map<String,Object> rule)Inject any necessary elements into the mapping rule based on the specific encoder type.- Parameters:
config
- the encoder element being parsedparserContext
- the parser contextrule
- the mapping rule
-
buildTranscoder
Return a bean definition for the transcoder to include in the mapping.- Returns:
- bean definition for an AttributeTranscoder
-
processLocalizedElement
private void processLocalizedElement(@Nonnull List<Element> elements, @Nonnull ManagedMap<String,Object> rule, @Nonnull @NotEmpty String propertyPrefix)Used to process string elements that contain an xml:lang attribute expressing localization.- Parameters:
elements
- list of elements, must not be null, may be emptyrule
- the map of rules to add topropertyPrefix
- the root property name to install
-