org.keycloak.models.map.authorization.adapter

## Class MapResourceAdapter

- java.lang.Object
- - org.keycloak.authorization.model.AbstractAuthorizationModel
  - - org.keycloak.models.map.authorization.adapter.AbstractResourceModel<MapResourceEntity>
    - - org.keycloak.models.map.authorization.adapter.MapResourceAdapter

- All Implemented Interfaces:
    Resource

      public class MapResourceAdapter
      extends AbstractResourceModel<MapResourceEntity>

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface org.keycloak.authorization.model.Resource

      `Resource.FilterOption, Resource.SearchableFields`

  - ### Field Summary

    - ### Fields inherited from class org.keycloak.models.map.authorization.adapter.AbstractResourceModel

      `entity`

    - ### Fields inherited from class org.keycloak.authorization.model.AbstractAuthorizationModel

      `storeFactory`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MapResourceAdapter(MapResourceEntity entity, StoreFactory storeFactory)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `List<String>` | `getAttribute(String name)` Returns the values of an attribute with the given `name`
    `Map<String,List<String>>` | `getAttributes()` Returns the attributes associated with this resource.
    `String` | `getDisplayName()` Returns the end user friendly name for this resource.
    `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.
    `String` | `getResourceServer()` Returns the `ResourceServer` to where this resource belongs to.
    `List<Scope>` | `getScopes()` Returns a `List` containing all the `Scope` associated with this resource.
    `String` | `getSingleAttribute(String name)` Returns the first value of an attribute with the given `name`
    `String` | `getType()` Returns a string representing the type of this resource.
    `Set<String>` | `getUris()` Returns a `List` containing all `URI` that uniquely identify this resource.
    `boolean` | `isOwnerManagedAccess()` Indicates if this resource can be managed by the resource owner.
    `void` | `removeAttribute(String name)`
    `void` | `setAttribute(String name, List<String> values)` Sets an attribute with the given `name` and `values`.
    `void` | `setDisplayName(String name)` Sets an end user friendly name for this resource.
    `void` | `setIconUri(String iconUri)` Sets an icon `URI` for this resource.
    `void` | `setName(String name)` Sets a name for this resource.
    `void` | `setOwnerManagedAccess(boolean ownerManagedAccess)` Sets if this resource can be managed by the resource owner.
    `void` | `setType(String type)` Sets a string representing the type of this resource.
    `String` | `toString()`
    `void` | `updateScopes(Set<Scope> scopes)` Update the set of scopes associated with this resource.
    `void` | `updateUris(Set<String> uri)` Sets a list of `URI` that uniquely identify this resource.

    - ### Methods inherited from class org.keycloak.models.map.authorization.adapter.AbstractResourceModel

      `equals, hashCode`

    - ### Methods inherited from class org.keycloak.authorization.model.AbstractAuthorizationModel

      `throwExceptionIfReadonly`

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

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

- - ### Constructor Detail

    - #### MapResourceAdapter

          public MapResourceAdapter(MapResourceEntity entity,
                                    StoreFactory storeFactory)

  - ### Method Detail

    - #### getId

          public String getId()

      Description copied from interface: `Resource`
      Returns the unique identifier for this instance.
      Returns:
        the unique identifier for this instance

    - #### getName

          public String getName()

      Description copied from interface: `Resource`
      Returns the resource's name.
      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.
      Parameters:
        `name` - the name of this resource

    - #### getDisplayName

          public String getDisplayName()

      Description copied from interface: `Resource`
      Returns the end user friendly name for this resource. If not defined, value for `Resource.getName()` is returned.
      Returns:
        the friendly name for this resource

    - #### setDisplayName

          public void setDisplayName(String name)

      Description copied from interface: `Resource`
      Sets an end user friendly name for this resource.
      Parameters:
        `name` - the name of this resource

    - #### getUris

          public Set<String> getUris()

      Description copied from interface: `Resource`
      Returns a `List` containing all `URI` that uniquely identify this resource.
      Returns:
        a `List` if `URI` for this resource or empty list if not defined.

    - #### updateUris

          public void updateUris(Set<String> uri)

      Description copied from interface: `Resource`
      Sets a list of `URI` that uniquely identify this 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.
      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.

    - #### getScopes

          public List<Scope> getScopes()

      Description copied from interface: `Resource`
      Returns a `List` containing all the `Scope` associated with this 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.
      Returns:
        a uri for an icon

    - #### setIconUri

          public void setIconUri(String iconUri)

      Description copied from interface: `Resource`
      Sets an icon `URI` for this resource.

    - #### getResourceServer

          public String getResourceServer()

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

    - #### 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.
      Returns:
        the owner of this resource

    - #### isOwnerManagedAccess

          public boolean isOwnerManagedAccess()

      Description copied from interface: `Resource`
      Indicates if this resource can be managed by the resource owner.
      Returns:
        `true` if this resource can be managed by the resource owner. Otherwise, `false`.

    - #### setOwnerManagedAccess

          public void setOwnerManagedAccess(boolean ownerManagedAccess)

      Description copied from interface: `Resource`
      Sets if this resource can be managed by the resource owner.
      Parameters:
        `ownerManagedAccess` - `true` indicates that this resource can be managed by the resource owner.

    - #### updateScopes

          public void updateScopes(Set<Scope> scopes)

      Description copied from interface: `Resource`
      Update the set of scopes associated with this resource.
      Parameters:
        `scopes` - the list of scopes to update

    - #### getAttributes

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

      Description copied from interface: `Resource`
      Returns the attributes associated with this resource.
      Returns:
        a map holding the attributes associated with this resource

    - #### getSingleAttribute

          public String getSingleAttribute(String name)

      Description copied from interface: `Resource`
      Returns the first value of an attribute with the given `name`
      Returns:
        the first value of an attribute

    - #### getAttribute

          public List<String> getAttribute(String name)

      Description copied from interface: `Resource`
      Returns the values of an attribute with the given `name`
      Returns:
        the values of an attribute

    - #### setAttribute

          public void setAttribute(String name,
                                   List<String> values)

      Description copied from interface: `Resource`
      Sets an attribute with the given `name` and `values`.
      Parameters:
        `name` - the attribute name

    - #### removeAttribute

          public void removeAttribute(String name)

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

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