Class ResourceSetDescription


  • @SupportedAll
    public class ResourceSetDescription
    extends Object
    Represents a resource set description created by an OAuth2 client (resource server).
    Since:
    13.0.0
    • Constructor Detail

      • ResourceSetDescription

        public ResourceSetDescription​(String id,
                                      String clientId,
                                      String resourceOwnerId,
                                      Map<String,​Object> description)
        Constructs a new ResourceSetDescription instance.
        Parameters:
        id - The unique id across all resource sets.
        clientId - The id of the client (resource server) which created the resource set.
        resourceOwnerId - The id of the user that owns this resource set.
        description - The description of the resource set.
      • ResourceSetDescription

        public ResourceSetDescription()
        Bean-spec compliant constructor
    • Method Detail

      • getId

        public String getId()
        Gets the unique resource set id of the resource set across all clients (resource servers).
        Returns:
        The unique id.
      • getRealm

        public String getRealm()
        Gets the realm for the Resource Set Description.
        Returns:
        The realm.
      • setRealm

        public void setRealm​(String realm)
        Sets the realm for the Resource Set Description.
        Parameters:
        realm - The realm.
      • getClientId

        public String getClientId()
        Gets the client id that created the resource set.
        Returns:
        The client id.
      • getResourceOwnerId

        public String getResourceOwnerId()
        Gets the resource owner id of the resource set.
        Returns:
        The resource owner id.
      • getPolicyUri

        public String getPolicyUri()
        Gets the policy uri for the resource set.
        Returns:
        The policy uri.
      • getName

        public String getName()
        Gets the name of the resource set.
        Returns:
        The resource set name.
      • getPolicy

        public JsonValue getPolicy()
        Gets the name of the policy linked to this resource set.
        Returns:
        The policy.
      • getUri

        public URI getUri()
        Gets the uri of the resource set.
        Returns:
        The resource set uri.
      • getType

        public String getType()
        Gets the type of the resource set.
        Returns:
        The resource set type.
      • getScopes

        public Set<String> getScopes()
        Gets the set of available scopes for the resource set.
        Returns:
        The available scopes.
      • getIconUri

        public URI getIconUri()
        Gets the resource set icon uri.
        Returns:
        The icon uri.
      • update

        public ResourceSetDescription update​(Map<String,​Object> description)
        Replaces the description of the resource set with the given description.
        Parameters:
        description - The description to replace with.
        Returns:
        This resource set description.
      • getDescription

        public JsonValue getDescription()
        Gets the resource set description as a JsonValue.
        Returns:
        The description as a JsonValue.
      • asMap

        public Map<String,​Object> asMap()
        Returns the description of the resource set as a Map.
        Returns:
        The description.
      • setId

        public void setId​(String id)
      • setClientId

        public void setClientId​(String clientId)
      • setResourceOwnerId

        public void setResourceOwnerId​(String resourceOwnerId)
      • setDescription

        public void setDescription​(JsonValue description)
      • setPolicyUri

        public void setPolicyUri​(String policyUri)
      • setName

        public void setName​(String name)
      • setPolicy

        public void setPolicy​(JsonValue policy)
      • copy

        public ResourceSetDescription copy()
        Returns a copy of this resource set description object.
        Returns:
        A copy of this resource set description.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object