Class BaseAttributeValueMatcherParser
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.filter.spring.BaseFilterParser
net.shibboleth.idp.attribute.filter.spring.matcher.BaseAttributeValueMatcherParser
- All Implemented Interfaces:
BeanDefinitionParser
- Direct Known Subclasses:
AbstractRegexMatcherParser
,AbstractStringMatcherParser
,AttributeInMetadataRuleParser
,ScopeMatchesShibMDScopeParser
,ValueMatchesShibMDScopeParser
Base function for all Attribute Value matchers.
This function takes care of the bean nesting needed to convert the bean (which is a natural matcher) into the correct type. Specifically:
PolicyRule With Id | Nest inside a PolicyFromMatcherId |
PolicyRule No Id | Nest inside a PolicyFromMatcher |
Attribute Not Id | Native |
Attribute ID Id | Nest inside a PolicyFromMatcherId inside a MatcherFromPolicy |
-
Field Summary
FieldsFields inherited from class net.shibboleth.idp.attribute.filter.spring.BaseFilterParser
AFP_ELEMENT_NAME, DENY_VALUE_RULE, NAMESPACE, PERMIT_VALUE_RULE, POLICY_REQUIREMENT_RULE, QUALIFIED_ID
Fields inherited from class org.springframework.beans.factory.xml.AbstractBeanDefinitionParser
ID_ATTRIBUTE, NAME_ATTRIBUTE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract void
doNativeParse
(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Parse the native bean class.protected void
doParse
(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Parse bean definition.protected Class<?>
getBeanClass
(Element element) The table at the top describes the precise work.protected abstract Class<?>
Method return the native Matcher implementation.protected boolean
hasAttributeId
(Element configElement) Helper function to determine if the Attribute Matcher has the attribute Id Specified.Methods inherited from class net.shibboleth.idp.attribute.filter.spring.BaseFilterParser
getAbsoluteReference, getQualifiedId, isPolicyRule, parseCustomElements, resolveId
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, shouldFireEvents, shouldGenerateId, shouldGenerateIdAsFallback, shouldParseNameAsAliases
-
Field Details
-
ATTRIBUTE_ID
ATTRIBUTE ID string.- See Also:
-
-
Constructor Details
-
BaseAttributeValueMatcherParser
public BaseAttributeValueMatcherParser()
-
-
Method Details
-
hasAttributeId
Helper function to determine if the Attribute Matcher has the attribute Id Specified. This influences decisions both in parsing and in which bean to summon.- Parameters:
configElement
- the config element to inspect- Returns:
- whether here is a an attribute Id
-
getBeanClass
The table at the top describes the precise work.- Overrides:
getBeanClass
in classAbstractSingleBeanDefinitionParser
-
doParse
protected void doParse(@Nonnull Element element, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder) Parse bean definition. If needs be we inject it into a parent bean (or two).Calculate the qualified id once, and set both the id property as well as a qualified id metadata attribute used by the
BaseFilterParser.resolveId(Element, AbstractBeanDefinition, ParserContext)
method.If we auto-generate a name then we issue a warning so users can (1) correct this, but also so they can make sense of the logging in the filters which uses the id extensively.
- Overrides:
doParse
in classBaseFilterParser
-
getNativeBeanClass
Method return the native Matcher implementation.- Returns:
- the class.
-
doNativeParse
protected abstract void doNativeParse(@Nonnull Element element, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder) Parse the native bean class. This is either called direct or indirectly and then injected into the nesting class.- Parameters:
element
- the configparserContext
- the contextbuilder
- the builder
-