org.keycloak.authorization.store

## Interface ScopeStore

- All Known Implementing Classes:
    CachedScopeStore, JPAScopeStore, MongoScopeStore

      public interface ScopeStore

  A `ScopeStore` is responsible to manage the persistence of `Scope` instances.
  Author:
    Pedro Igor

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `Scope` | `create(String name, ResourceServer resourceServer)` Creates a new `Scope` instance.
    `void` | `delete(String id)` Deletes a scope from the underlying persistence mechanism.
    `Scope` | `findById(String id)` Returns a `Scope` with the given `id`
    `Scope` | `findByName(String name, String resourceServerId)` Returns a `Scope` with the given `name`
    `List<Scope>` | `findByResourceServer(String id)` Returns a list of `Scope` associated with a `ResourceServer` with the given `resourceServerId`.

- - ### Method Detail

    - #### create

          Scope create(String name,
                       ResourceServer resourceServer)

      Creates a new `Scope` instance. The new instance is not necessarily persisted though, which may require a call to the {#save} method to actually make it persistent.
      Parameters:
        `name` - the name of the scope
        `resourceServer` - the resource server to which this scope belongs
      Returns:
        a new instance of `Scope`

    - #### delete

          void delete(String id)

      Deletes a scope from the underlying persistence mechanism.
      Parameters:
        `id` - the id of the scope to delete

    - #### findById

          Scope findById(String id)

      Returns a `Scope` with the given `id`
      Parameters:
        `id` - the identifier of the scope
      Returns:
        a scope with the given identifier.

    - #### findByName

          Scope findByName(String name,
                           String resourceServerId)

      Returns a `Scope` with the given `name`
      Parameters:
        `name` - the name of the scope
        `resourceServerId` -
      Returns:
        a scope with the given name.

    - #### findByResourceServer

          List<Scope> findByResourceServer(String id)

      Returns a list of `Scope` associated with a `ResourceServer` with the given `resourceServerId`.
      Parameters:
        `resourceServerId` - the identifier of a resource server
      Returns:
        a list of scopes that belong to the given resource server

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