Class AbstractStringPolicyRule

All Implemented Interfaces:
PolicyRequirementRule, Component, DestructableComponent, IdentifiableComponent, IdentifiedComponent, InitializableComponent
Direct Known Subclasses:
AttributeIssuerPolicyRule, AttributeRequesterPolicyRule, PrincipalNamePolicyRule, ProxiedRequesterPolicyRule

public abstract class AbstractStringPolicyRule
extends AbstractPolicyRule
implements PolicyRequirementRule
General PolicyRequirementRule for String comparison of strings in Attribute Filters.
  • Field Details

    • matchString

      private String matchString
      String to match for a positive evaluation.
    • caseSensitive

      private boolean caseSensitive
      Whether the match evaluation is case sensitive.
  • Constructor Details

    • AbstractStringPolicyRule

      public AbstractStringPolicyRule()
  • Method Details

    • getMatchString

      @Nullable public String getMatchString()
      Gets the string to match for a positive evaluation.
      Returns:
      string to match for a positive evaluation
    • setMatchString

      public void setMatchString​(@Nullable String match)
      Sets the string to match for a positive evaluation.
      Parameters:
      match - string to match for a positive evaluation
    • isIgnoreCase

      @Deprecated public boolean isIgnoreCase()
      Deprecated.
      in V4: Use isCaseSensitive
      Gets whether the policy evaluation is case insensitive.
      Returns:
      whether the policy evaluation is case insensitive
    • setIgnoreCase

      @Deprecated public void setIgnoreCase​(boolean isCaseInsensitive)
      Deprecated.
      in V4: Use setCaseSensitive
      Sets whether the policy evaluation is case insensitive.
      Parameters:
      isCaseInsensitive - whether the policy evaluation is case insensitive
    • isCaseSensitive

      public boolean isCaseSensitive()
      Gets whether the policy evaluation is case sensitive.
      Returns:
      whether the policy evaluation is case sensitive
    • setCaseSensitive

      public void setCaseSensitive​(boolean isCaseSensitive)
      Sets whether the policy evaluation is case sensitive.
      Parameters:
      isCaseSensitive - whether the policy evaluation is case sensitive
    • stringCompare

      protected PolicyRequirementRule.Tristate stringCompare​(@Nullable String value)
      Matches the given value against the provided match string.
      Parameters:
      value - the value to evaluate
      Returns:
      true if the value matches the given match string, false if not