org.keycloak.representations.idm.authorization

## Class ResourceRepresentation

- java.lang.Object
- - org.keycloak.representations.idm.authorization.ResourceRepresentation

- Direct Known Subclasses:
    AbstractResourceService.Resource, UmaResourceRepresentation

      public class ResourceRepresentation
      extends Object

  One or more resources that the resource server manages as a set of protected resources.

  For more details, OAuth-resource-reg.

  Author:
    Pedro Igor

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceRepresentation()` Creates a new instance.
    `ResourceRepresentation(String name, Set<ScopeRepresentation> scopes)` Creates a new instance.
    `ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, Set<String> uris, String type)` Creates a new instance.
    `ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, Set<String> uris, String type, String iconUri)` Creates a new instance.
    `ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, String uri, String type)`
    `ResourceRepresentation(String name, Set<ScopeRepresentation> scopes, String uri, String type, String iconUri)`
    `ResourceRepresentation(String name, String... scopes)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addScope(ScopeRepresentation scope)`
    `void` | `addScope(String... scopeNames)`
    `boolean` | `equals(Object o)`
    `Map<String,List<String>>` | `getAttributes()`
    `String` | `getDisplayName()`
    `String` | `getIconUri()`
    `String` | `getId()`
    `String` | `getName()`
    `ResourceOwnerRepresentation` | `getOwner()`
    `Boolean` | `getOwnerManagedAccess()`
    `Set<ScopeRepresentation>` | `getScopes()`
    `String` | `getType()`
    `String` | `getUri()` Deprecated.
    `Set<String>` | `getUris()`
    `int` | `hashCode()`
    `void` | `setAttributes(Map<String,List<String>> attributes)`
    `void` | `setDisplayName(String displayName)`
    `void` | `setIconUri(String iconUri)`
    `void` | `setId(String id)`
    `void` | `setName(String name)`
    `void` | `setOwner(ResourceOwnerRepresentation owner)`
    `void` | `setOwner(String ownerId)`
    `void` | `setOwnerManagedAccess(Boolean ownerManagedAccess)`
    `void` | `setScopes(Set<ScopeRepresentation> scopes)`
    `void` | `setType(String type)`
    `void` | `setUri(String uri)` Deprecated.
    `void` | `setUris(Set<String> uris)`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ResourceRepresentation

          public ResourceRepresentation(String name,
                                        Set<ScopeRepresentation> scopes,
                                        Set<String> uris,
                                        String type,
                                        String iconUri)

      Creates a new instance.
      Parameters:
        `name` - a human-readable string describing a set of one or more resources
        `uris` - a `List` of `URI` that provides network locations for the resource set being registered
        `type` - a string uniquely identifying the semantics of the resource set
        `scopes` - the available scopes for this resource set
        `iconUri` - a `URI` for a graphic icon representing the resource set

    - #### ResourceRepresentation

          public ResourceRepresentation(String name,
                                        Set<ScopeRepresentation> scopes,
                                        String uri,
                                        String type,
                                        String iconUri)

    - #### ResourceRepresentation

          public ResourceRepresentation(String name,
                                        Set<ScopeRepresentation> scopes,
                                        Set<String> uris,
                                        String type)

      Creates a new instance.
      Parameters:
        `name` - a human-readable string describing a set of one or more resources
        `uris` - a `List` of `URI` that provides the network location for the resource set being registered
        `type` - a string uniquely identifying the semantics of the resource set
        `scopes` - the available scopes for this resource set

    - #### ResourceRepresentation

          public ResourceRepresentation(String name,
                                        Set<ScopeRepresentation> scopes,
                                        String uri,
                                        String type)

    - #### ResourceRepresentation

          public ResourceRepresentation(String name,
                                        Set<ScopeRepresentation> scopes)

      Creates a new instance.
      Parameters:
        `name` - a human-readable string describing a set of one or more resources
        `serverUri` - a `URI` that identifies this resource server
        `scopes` - the available scopes for this resource set

    - #### ResourceRepresentation

          public ResourceRepresentation(String name,
                                        String... scopes)

    - #### ResourceRepresentation

          public ResourceRepresentation()

      Creates a new instance.

  - ### Method Detail

    - #### setId

          public void setId(String id)

    - #### getId

          public String getId()

    - #### getName

          public String getName()

    - #### getDisplayName

          public String getDisplayName()

    - #### getUri

          @Deprecated
          public String getUri()

      Deprecated.

    - #### getUris

          public Set<String> getUris()

    - #### getType

          public String getType()

    - #### getScopes

          public Set<ScopeRepresentation> getScopes()

    - #### getIconUri

          public String getIconUri()

    - #### setName

          public void setName(String name)

    - #### setDisplayName

          public void setDisplayName(String displayName)

    - #### setUri

          @Deprecated
          public void setUri(String uri)

      Deprecated.

    - #### setUris

          public void setUris(Set<String> uris)

    - #### setType

          public void setType(String type)

    - #### setScopes

          public void setScopes(Set<ScopeRepresentation> scopes)

    - #### setIconUri

          public void setIconUri(String iconUri)

    - #### getOwner

          public ResourceOwnerRepresentation getOwner()

    - #### setOwner

          public void setOwner(ResourceOwnerRepresentation owner)

    - #### setOwner

          public void setOwner(String ownerId)

    - #### getOwnerManagedAccess

          public Boolean getOwnerManagedAccess()

    - #### setOwnerManagedAccess

          public void setOwnerManagedAccess(Boolean ownerManagedAccess)

    - #### addScope

          public void addScope(String... scopeNames)

    - #### addScope

          public void addScope(ScopeRepresentation scope)

    - #### getAttributes

          public Map<String,List<String>> getAttributes()

    - #### setAttributes

          public void setAttributes(Map<String,List<String>> attributes)

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2020 JBoss by Red Hat. All rights reserved.