Class PolicyFromMatcherId

All Implemented Interfaces:
PolicyRequirementRule, Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent

public final class PolicyFromMatcherId extends BaseBridgingClass implements PolicyRequirementRule, IdentifiedComponent, DestructableComponent
Bridging class to go from a Matcher to a PolicyRequirementRule.

If the value of the supplied attribute matches then this is true, otherwise false.

  • Field Details

    • theMatcher

      private final Matcher theMatcher
      The rule we are shadowing.
    • attributeId

      private final String attributeId
      The attribute Id we care about.
    • log

      private final org.slf4j.Logger log
      Class logger.
  • Constructor Details

    • PolicyFromMatcherId

      public PolicyFromMatcherId(@Nonnull @ParameterName(name="matcher") Matcher matcher, @Nonnull @NotEmpty @ParameterName(name="attribute") String attribute)
      matcher - the class we are bridging to
      attribute - the Id of the attribute in question.
  • Method Details

    • getAttributeId

      @Nonnull public String getAttributeId()
      Gets the Id of the attribute in question.
      the id.
    • getMatcher

      @Nonnull public Matcher getMatcher()
      Testing support. Get the embedded matcher.
      the embedded matcher.
    • matches

      @Nonnull public PolicyRequirementRule.Tristate matches(@Nonnull AttributeFilterContext context)
      Evaluate what this rule means.
      Specified by:
      matches in interface PolicyRequirementRule
      context - the context.
      whether the rule holds