org.keycloak.authorization.jpa.entities

## Class ResourceEntity

- java.lang.Object
- - org.keycloak.authorization.jpa.entities.ResourceEntity

- All Implemented Interfaces:
    Resource

      @Entity
      public class ResourceEntity
      extends Object
      implements Resource

  Author:
    Pedro Igor

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ResourceEntity()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `String` | `getIconUri()` Returns an icon `URI` for this resource.
    `String` | `getId()` Returns the unique identifier for this instance.
    `String` | `getName()` Returns the resource's name.
    `String` | `getOwner()` Returns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.
    `List<PolicyEntity>` | `getPolicies()`
    `ResourceServerEntity` | `getResourceServer()` Returns the `ResourceServer` to where this resource belongs to.
    `List<ScopeEntity>` | `getScopes()` Returns a `List` containing all the `Scope` associated with this resource.
    `String` | `getType()` Returns a string representing the type of this resource.
    `String` | `getUri()` Returns a `URI` that uniquely identify this resource.
    `void` | `setIconUri(String iconUri)` Sets an icon `URI` for this resource.
    `void` | `setId(String id)`
    `void` | `setName(String name)` Sets a name for this resource.
    `void` | `setOwner(String owner)`
    `void` | `setPolicies(List<PolicyEntity> policies)`
    `void` | `setResourceServer(ResourceServerEntity resourceServer)`
    `void` | `setType(String type)` Sets a string representing the type of this resource.
    `void` | `setUri(String uri)` Sets a `URI` that uniquely identify this resource.
    `void` | `updateScopes(Set<Scope> toUpdate)`

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

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

- - ### Constructor Detail

    - #### ResourceEntity

          public ResourceEntity()

  - ### Method Detail

    - #### getId

          public String getId()

      Description copied from interface: `Resource`
      Returns the unique identifier for this instance.
      Specified by:
        `getId` in interface `Resource`
      Returns:
        the unique identifier for this instance

    - #### setId

          public void setId(String id)

    - #### getName

          public String getName()

      Description copied from interface: `Resource`
      Returns the resource's name.
      Specified by:
        `getName` in interface `Resource`
      Returns:
        the name of this resource

    - #### setName

          public void setName(String name)

      Description copied from interface: `Resource`
      Sets a name for this resource. The name must be unique.
      Specified by:
        `setName` in interface `Resource`
      Parameters:
        `name` - the name of this resource

    - #### getUri

          public String getUri()

      Description copied from interface: `Resource`
      Returns a `URI` that uniquely identify this resource.
      Specified by:
        `getUri` in interface `Resource`
      Returns:
        an `URI` for this resource or null if not defined.

    - #### setUri

          public void setUri(String uri)

      Description copied from interface: `Resource`
      Sets a `URI` that uniquely identify this resource.
      Specified by:
        `setUri` in interface `Resource`
      Parameters:
        `uri` - an `URI` for this resource

    - #### getType

          public String getType()

      Description copied from interface: `Resource`
      Returns a string representing the type of this resource.
      Specified by:
        `getType` in interface `Resource`
      Returns:
        the type of this resource or null if not defined

    - #### setType

          public void setType(String type)

      Description copied from interface: `Resource`
      Sets a string representing the type of this resource.
      Specified by:
        `setType` in interface `Resource`

    - #### getScopes

          public List<ScopeEntity> getScopes()

      Description copied from interface: `Resource`
      Returns a `List` containing all the `Scope` associated with this resource.
      Specified by:
        `getScopes` in interface `Resource`
      Returns:
        a list with all scopes associated with this resource

    - #### getIconUri

          public String getIconUri()

      Description copied from interface: `Resource`
      Returns an icon `URI` for this resource.
      Specified by:
        `getIconUri` in interface `Resource`
      Returns:
        a uri for an icon

    - #### setIconUri

          public void setIconUri(String iconUri)

      Description copied from interface: `Resource`
      Sets an icon `URI` for this resource.
      Specified by:
        `setIconUri` in interface `Resource`

    - #### getResourceServer

          public ResourceServerEntity getResourceServer()

      Description copied from interface: `Resource`
      Returns the `ResourceServer` to where this resource belongs to.
      Specified by:
        `getResourceServer` in interface `Resource`
      Returns:
        the resource server associated with this resource

    - #### setResourceServer

          public void setResourceServer(ResourceServerEntity resourceServer)

    - #### getOwner

          public String getOwner()

      Description copied from interface: `Resource`
      Returns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.
      Specified by:
        `getOwner` in interface `Resource`
      Returns:
        the owner of this resource

    - #### setOwner

          public void setOwner(String owner)

    - #### getPolicies

          public List<PolicyEntity> getPolicies()

    - #### updateScopes

          public void updateScopes(Set<Scope> toUpdate)

      Specified by:
        `updateScopes` in interface `Resource`

    - #### setPolicies

          public void setPolicies(List<PolicyEntity> policies)

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