Class BasePolicyRuleParser
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.policyrule.BasePolicyRuleParser
- All Implemented Interfaces:
BeanDefinitionParser
- Direct Known Subclasses:
AbstractEntityAttributeRuleParser
,AbstractEntityGroupRuleParser
,AbstractNameIDFormatRuleParser
,AbstractRegexPolicyRuleParser
,AbstractRegistrationAuthorityRuleParser
,AbstractStringPolicyRuleParser
,InboundRuleParser
,NumOfAttributeValuesRuleParser
,OutboundRuleParser
,PredicateRuleParser
Base function for all natural policy rules.
This function takes care of the bean nesting needed to convert the bean (which is a natural policy rule) into the correct type. Specifically:
PolicyRule | Native |
Matcher | Nest inside a MatcherFromPolicy |
-
Field Summary
Fields 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) Parser the native bean class.protected void
doParse
(Element element, ParserContext parserContext, BeanDefinitionBuilder builder) Parse bean definition.protected Class<?>
getBeanClass
(Element element) 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
-
Constructor Details
-
BasePolicyRuleParser
public BasePolicyRuleParser()
-
-
Method Details
-
hasAttributeId
Helper function to determine if the Attribute Matcher has the attribute Id Specified.- Parameters:
configElement
- the config element to inspect- Returns:
- whether here is a an attribute Id
-
getBeanClass
- Overrides:
getBeanClass
in classAbstractSingleBeanDefinitionParser
-
doParse
protected void doParse(@Nonnull Element element, @Nonnull ParserContext parserContext, @Nonnull BeanDefinitionBuilder builder) Parse bean definition. If needs be inject it into a parent bean.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) Parser the native bean class. This is either called direct or then injected into the nesting class.- Parameters:
element
- the configparserContext
- the contextbuilder
- the builder
-