Class ScopesContainer

java.lang.Object
net.shibboleth.idp.saml.metadata.ScopesContainer

public class ScopesContainer
extends Object
A container for all the Scope elements (attached to either a EntityDescriptor, IDPSSODescriptor or AttributeAuthorityDescriptor).
  • Field Details

    • simpleScopes

      @Nonnull private Set<String> simpleScopes
      The (non Regexp) scopes.
    • regexpScopes

      @Nonnull private List<Predicate<String>> regexpScopes
      The Regexp scopes.
  • Constructor Details

    • ScopesContainer

      public ScopesContainer()
  • Method Details

    • setSimpleScopes

      public void setSimpleScopes​(@Nullable Set<String> scopes)
      Sets the non-regexp Scopes.
      We force the input to be a set so as to enforce no duplicates and any performance hit as a result.
      Parameters:
      scopes - what to set.
    • setRegexpScopes

      public void setRegexpScopes​(@Nullable Set<String> scopes)
      Sets the regexp scopes.
      We force the input to be a set so as to enforce no duplicates and any performance hit as a result.
      Parameters:
      scopes - what to set.
    • matchesScope

      public boolean matchesScope​(@Nonnull @NotEmpty String scope)
      Does the provided string match the scopes for this XMLObject?

      We test first against the non regexp scopes for the sake of performance.

      Parameters:
      scope - what to test.
      Returns:
      whether it matches any of the scopes.