org.keycloak.authorization.model

## Interface Resource

- All Known Implementing Classes:
    CachedResource, ResourceAdapter, ResourceEntity

      public interface Resource

  Represents a resource, which is usually protected by a set of policies within a resource server.
  Author:
    Pedro Igor

- - ### Method Summary

    All Methods Instance Methods Abstract 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.
    `<R extends ResourceServer> R` | `getResourceServer()` Returns the `ResourceServer` to where this resource belongs to.
    `<S extends Scope> List<S>` | `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` | `setName(String name)` Sets a name for this resource.
    `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> scopes)`

- - ### Method Detail

    - #### getId

          String getId()

      Returns the unique identifier for this instance.
      Returns:
        the unique identifier for this instance

    - #### getName

          String getName()

      Returns the resource's name.
      Returns:
        the name of this resource

    - #### setName

          void setName(String name)

      Sets a name for this resource. The name must be unique.
      Parameters:
        `name` - the name of this resource

    - #### getUri

          String getUri()

      Returns a `URI` that uniquely identify this resource.
      Returns:
        an `URI` for this resource or null if not defined.

    - #### setUri

          void setUri(String uri)

      Sets a `URI` that uniquely identify this resource.
      Parameters:
        `uri` - an `URI` for this resource

    - #### getType

          String getType()

      Returns a string representing the type of this resource.
      Returns:
        the type of this resource or null if not defined

    - #### setType

          void setType(String type)

      Sets a string representing the type of this resource.

    - #### getScopes

          <S extends Scope> List<S> getScopes()

      Returns a `List` containing all the `Scope` associated with this resource.
      Returns:
        a list with all scopes associated with this resource

    - #### getIconUri

          String getIconUri()

      Returns an icon `URI` for this resource.
      Returns:
        a uri for an icon

    - #### setIconUri

          void setIconUri(String iconUri)

      Sets an icon `URI` for this resource.

    - #### getResourceServer

          <R extends ResourceServer> R getResourceServer()

      Returns the `ResourceServer` to where this resource belongs to.
      Returns:
        the resource server associated with this resource

    - #### getOwner

          String getOwner()

      Returns the resource's owner, which is usually an identifier that uniquely identifies the resource's owner.
      Returns:
        the owner of this resource

    - #### updateScopes

          void updateScopes(Set<Scope> scopes)

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