org.keycloak.models.file.adapter

## Class RoleAdapter

- java.lang.Object
- - org.keycloak.models.file.adapter.RoleAdapter

- All Implemented Interfaces:
    RoleModel

      public class RoleAdapter
      extends Object
      implements RoleModel

  RoleModel for JSON persistence.
  Author:
    Stan Silvert ssilvert@redhat.com (C) 2015 Red Hat Inc.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RoleAdapter(RealmModel realm, RoleEntity roleEntity)`
    `RoleAdapter(RealmModel realm, RoleEntity roleEntity, RoleContainerModel roleContainer)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addCompositeRole(RoleModel childRole)`
    `boolean` | `equals(Object o)`
    `Set<RoleModel>` | `getComposites()`
    `RoleContainerModel` | `getContainer()`
    `String` | `getDescription()`
    `String` | `getId()`
    `String` | `getName()`
    `RoleEntity` | `getRoleEntity()`
    `int` | `hashCode()`
    `boolean` | `hasRole(RoleModel role)`
    `boolean` | `isComposite()`
    `boolean` | `isRealmRole()`
    `void` | `removeApplicationComposites(String appId)` Recursively remove composite roles for the specified app
    `void` | `removeCompositeRole(RoleModel childRole)`
    `void` | `setDescription(String description)`
    `void` | `setName(String name)`

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

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

- - ### Constructor Detail

    - #### RoleAdapter

          public RoleAdapter(RealmModel realm,
                     RoleEntity roleEntity)

    - #### RoleAdapter

          public RoleAdapter(RealmModel realm,
                     RoleEntity roleEntity,
                     RoleContainerModel roleContainer)

  - ### Method Detail

    - #### getRoleEntity

          public RoleEntity getRoleEntity()

    - #### isRealmRole

          public boolean isRealmRole()

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `RoleModel`

    - #### getName

          public String getName()

      Specified by:
        `getName` in interface `RoleModel`

    - #### setName

          public void setName(String name)

      Specified by:
        `setName` in interface `RoleModel`

    - #### getDescription

          public String getDescription()

      Specified by:
        `getDescription` in interface `RoleModel`

    - #### setDescription

          public void setDescription(String description)

      Specified by:
        `setDescription` in interface `RoleModel`

    - #### isComposite

          public boolean isComposite()

      Specified by:
        `isComposite` in interface `RoleModel`

    - #### addCompositeRole

          public void addCompositeRole(RoleModel childRole)

      Specified by:
        `addCompositeRole` in interface `RoleModel`

    - #### removeApplicationComposites

          public void removeApplicationComposites(String appId)

      Recursively remove composite roles for the specified app
      Parameters:
        `appId` -

    - #### removeCompositeRole

          public void removeCompositeRole(RoleModel childRole)

      Specified by:
        `removeCompositeRole` in interface `RoleModel`

    - #### getComposites

          public Set<RoleModel> getComposites()

      Specified by:
        `getComposites` in interface `RoleModel`

    - #### getContainer

          public RoleContainerModel getContainer()

      Specified by:
        `getContainer` in interface `RoleModel`

    - #### hasRole

          public boolean hasRole(RoleModel role)

      Specified by:
        `hasRole` in interface `RoleModel`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

Copyright © 2015. All rights reserved.