Class Scope

    • Constructor Detail

      • Scope

        public Scope()
        Creates a new empty authorisation scope.
      • Scope

        public Scope​(Scope scope)
        Creates a new scope from the specified scope.
        Parameters:
        scope - The scope. May be null.
      • Scope

        public Scope​(String... values)
        Creates a new authorisation scope with the specified string values.
        Parameters:
        values - The string values.
      • Scope

        public Scope​(Scope.Value... values)
        Creates a new authorisation scope with the specified values.
        Parameters:
        values - The values.
    • Method Detail

      • add

        public boolean add​(String value)
        Adds the specified string value to this scope.
        Parameters:
        value - The string value. Must not be null.
        Returns:
        true if this scope did not already contain the specified value.
      • contains

        public boolean contains​(String value)
        Checks if this scope contains the specified string value.
        Parameters:
        value - The string value. Must not be null.
        Returns:
        true if the value is contained, else false.
      • toStringList

        public List<StringtoStringList()
        Returns the string list representation of this scope. The scope values will be serialised in the order they were added.
        Returns:
        The string list representation.
      • parse

        public static Scope parse​(Collection<String> collection)
        Parses a scope from the specified string collection representation.
        Parameters:
        collection - The string collection, null if not specified.
        Returns:
        The scope, null if not specified.
      • parse

        public static Scope parse​(String s)
        Parses a scope from the specified string representation.
        Parameters:
        s - The scope string, null if not specified.
        Returns:
        The scope, null if not specified.