Class BaseAttributeEncoderParser
java.lang.Object
org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
org.springframework.beans.factory.xml.AbstractSingleBeanDefinitionParser
net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser
net.shibboleth.idp.attribute.resolver.spring.enc.BaseAttributeEncoderParser
- All Implemented Interfaces:
BeanDefinitionParser
- Direct Known Subclasses:
BaseSAML1AttributeEncoderParser,BaseSAML2AttributeEncoderParser
Base class for Spring bean definition parser for attribute encoders.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerLog4j logger.static final StringLocal name of name attribute.Fields inherited from class net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser
CUSTOM_PARSER_PROPERTIES_LOCATIONFields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract BeanReferenceReturn a bean definition for the transcoder to include in the mapping.protected abstract voidInject 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 booleanprotected booleanMethods inherited from class net.shibboleth.shared.spring.custom.AbstractCustomBeanDefinitionParser
getCustomProperty, 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, shouldGenerateIdAsFallback
-
Field Details
-
NAME_ATTRIBUTE_NAME
Local name of name attribute.- See Also:
-
log
@Nonnull private final org.slf4j.Logger logLog4j logger.
-
-
Constructor Details
-
BaseAttributeEncoderParser
public BaseAttributeEncoderParser()
-
-
Method Details
-
getBeanClass
- Overrides:
getBeanClassin classAbstractSingleBeanDefinitionParser
-
shouldGenerateId
protected boolean shouldGenerateId()- Overrides:
shouldGenerateIdin classAbstractBeanDefinitionParser
-
shouldParseNameAsAliases
protected boolean shouldParseNameAsAliases()- Overrides:
shouldParseNameAsAliasesin classAbstractBeanDefinitionParser
-
doParse
protected void doParse(@Nonnull Element config, @Nonnull ParserContext context, @Nonnull 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
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
-