Class BasePolicyRuleParser

All Implemented Interfaces:
Direct Known Subclasses:
AbstractEntityAttributeRuleParser, AbstractEntityGroupRuleParser, AbstractNameIDFormatRuleParser, AbstractRegexPolicyRuleParser, AbstractRegistrationAuthorityRuleParser, AbstractStringPolicyRuleParser, InboundRuleParser, NumOfAttributeValuesRuleParser, OutboundRuleParser, PredicateRuleParser

public abstract class BasePolicyRuleParser extends BaseFilterParser
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:

Bean Nesting
PolicyRule Native
Matcher Nest inside a MatcherFromPolicy
  • Constructor Details

    • BasePolicyRuleParser

      public BasePolicyRuleParser()
  • Method Details

    • hasAttributeId

      protected boolean hasAttributeId(@Nonnull Element configElement)
      Helper function to determine if the Attribute Matcher has the attribute Id Specified.
      configElement - the config element to inspect
      whether here is a an attribute Id
    • getBeanClass

      @Nonnull protected Class<?> getBeanClass(@Nonnull Element element)
      getBeanClass in class AbstractSingleBeanDefinitionParser
    • 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.

      doParse in class BaseFilterParser
    • getNativeBeanClass

      @Nonnull protected abstract Class<?> getNativeBeanClass()
      Method return the native Matcher implementation.
      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.
      element - the config
      parserContext - the context
      builder - the builder