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.LoggerlogLog4j logger.static StringNAME_ATTRIBUTE_NAMELocal 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
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract BeanReferencebuildTranscoder()Return a bean definition for the transcoder to include in the mapping.protected abstract voiddoParse(Element config, ParserContext parserContext, Map<String,Object> rule)Inject any necessary elements into the mapping rule based on the specific encoder type.protected voiddoParse(Element config, ParserContext context, BeanDefinitionBuilder builder)protected Class<TranscodingRule>getBeanClass(Element element)private voidprocessLocalizedElement(List<Element> elements, ManagedMap<String,Object> rule, String propertyPrefix)Used to process string elements that contain an xml:lang attribute expressing localization.protected booleanshouldGenerateId()protected booleanshouldParseNameAsAliases()-
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 Detail
-
NAME_ATTRIBUTE_NAME
@Nonnull @NotEmpty public static final String NAME_ATTRIBUTE_NAME
Local name of name attribute.- See Also:
- Constant Field Values
-
log
@Nonnull private final org.slf4j.Logger log
Log4j logger.
-
-
Method Detail
-
getBeanClass
protected Class<TranscodingRule> getBeanClass(Element element)
- Overrides:
getBeanClassin classAbstractSingleBeanDefinitionParser
-
shouldGenerateId
protected boolean shouldGenerateId()
- Overrides:
shouldGenerateIdin classAbstractBeanDefinitionParser
-
shouldParseNameAsAliases
protected boolean shouldParseNameAsAliases()
- Overrides:
shouldParseNameAsAliasesin classAbstractBeanDefinitionParser
-
doParse
protected void doParse(Element config, ParserContext context, BeanDefinitionBuilder builder)
- Overrides:
doParsein 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
@Nonnull protected abstract BeanReference 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
-
-