org.keycloak.models.session

## Class PersistentClientSessionAdapter

- java.lang.Object
- - org.keycloak.models.session.PersistentClientSessionAdapter

- All Implemented Interfaces:
    ClientSessionModel

      public class PersistentClientSessionAdapter
      extends Object
      implements ClientSessionModel

  Author:
    Marek Posolda

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `PersistentClientSessionAdapter.PersistentClientSessionData`

    - ### Nested classes/interfaces inherited from interface org.keycloak.models.ClientSessionModel

      `ClientSessionModel.Action, ClientSessionModel.ExecutionStatus`

  - ### Field Summary

    - ### Fields inherited from interface org.keycloak.models.ClientSessionModel

      `ACTION_KEY`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PersistentClientSessionAdapter(ClientSessionModel clientSession)`
    `PersistentClientSessionAdapter(PersistentClientSessionModel model, RealmModel realm, ClientModel client, UserSessionModel userSession)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addRequiredAction(String action)`
    `void` | `addRequiredAction(UserModel.RequiredAction action)`
    `void` | `clearExecutionStatus()`
    `void` | `clearUserSessionNotes()`
    `boolean` | `equals(Object o)`
    `String` | `getAction()`
    `UserModel` | `getAuthenticatedUser()`
    `String` | `getAuthMethod()` Authentication request type, i.e.
    `ClientModel` | `getClient()`
    `Map<String,ClientSessionModel.ExecutionStatus>` | `getExecutionStatus()`
    `String` | `getId()`
    `String` | `getNote(String name)`
    `Map<String,String>` | `getNotes()`
    `Set<String>` | `getProtocolMappers()`
    `RealmModel` | `getRealm()`
    `String` | `getRedirectUri()`
    `Set<String>` | `getRequiredActions()` Required actions that are attached to this client session.
    `Set<String>` | `getRoles()`
    `int` | `getTimestamp()`
    `PersistentClientSessionModel` | `getUpdatedModel()`
    `UserSessionModel` | `getUserSession()`
    `Map<String,String>` | `getUserSessionNotes()` These are notes you want applied to the UserSessionModel when the client session is attached to it.
    `int` | `hashCode()`
    `void` | `removeNote(String name)`
    `void` | `removeRequiredAction(String action)`
    `void` | `removeRequiredAction(UserModel.RequiredAction action)`
    `void` | `setAction(String action)`
    `void` | `setAuthenticatedUser(UserModel user)`
    `void` | `setAuthMethod(String method)`
    `void` | `setExecutionStatus(String authenticator, ClientSessionModel.ExecutionStatus status)`
    `void` | `setNote(String name, String value)`
    `void` | `setProtocolMappers(Set<String> protocolMappers)`
    `void` | `setRedirectUri(String uri)`
    `void` | `setRoles(Set<String> roles)`
    `void` | `setTimestamp(int timestamp)`
    `void` | `setUserSession(UserSessionModel userSession)`
    `void` | `setUserSessionNote(String name, String value)` These are notes you want applied to the UserSessionModel when the client session is attached to it.

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

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

- - ### Constructor Detail

    - #### PersistentClientSessionAdapter

          public PersistentClientSessionAdapter(ClientSessionModel clientSession)

    - #### PersistentClientSessionAdapter

          public PersistentClientSessionAdapter(PersistentClientSessionModel model,
                                                RealmModel realm,
                                                ClientModel client,
                                                UserSessionModel userSession)

  - ### Method Detail

    - #### getUpdatedModel

          public PersistentClientSessionModel getUpdatedModel()

    - #### getId

          public String getId()

      Specified by:
        `getId` in interface `ClientSessionModel`

    - #### getRealm

          public RealmModel getRealm()

      Specified by:
        `getRealm` in interface `ClientSessionModel`

    - #### getClient

          public ClientModel getClient()

      Specified by:
        `getClient` in interface `ClientSessionModel`

    - #### getUserSession

          public UserSessionModel getUserSession()

      Specified by:
        `getUserSession` in interface `ClientSessionModel`

    - #### setUserSession

          public void setUserSession(UserSessionModel userSession)

      Specified by:
        `setUserSession` in interface `ClientSessionModel`

    - #### getRedirectUri

          public String getRedirectUri()

      Specified by:
        `getRedirectUri` in interface `ClientSessionModel`

    - #### setRedirectUri

          public void setRedirectUri(String uri)

      Specified by:
        `setRedirectUri` in interface `ClientSessionModel`

    - #### getTimestamp

          public int getTimestamp()

      Specified by:
        `getTimestamp` in interface `ClientSessionModel`

    - #### setTimestamp

          public void setTimestamp(int timestamp)

      Specified by:
        `setTimestamp` in interface `ClientSessionModel`

    - #### getAction

          public String getAction()

      Specified by:
        `getAction` in interface `ClientSessionModel`

    - #### setAction

          public void setAction(String action)

      Specified by:
        `setAction` in interface `ClientSessionModel`

    - #### getRoles

          public Set<String> getRoles()

      Specified by:
        `getRoles` in interface `ClientSessionModel`

    - #### setRoles

          public void setRoles(Set<String> roles)

      Specified by:
        `setRoles` in interface `ClientSessionModel`

    - #### getProtocolMappers

          public Set<String> getProtocolMappers()

      Specified by:
        `getProtocolMappers` in interface `ClientSessionModel`

    - #### setProtocolMappers

          public void setProtocolMappers(Set<String> protocolMappers)

      Specified by:
        `setProtocolMappers` in interface `ClientSessionModel`

    - #### getExecutionStatus

          public Map<String,ClientSessionModel.ExecutionStatus> getExecutionStatus()

      Specified by:
        `getExecutionStatus` in interface `ClientSessionModel`

    - #### setExecutionStatus

          public void setExecutionStatus(String authenticator,
                                         ClientSessionModel.ExecutionStatus status)

      Specified by:
        `setExecutionStatus` in interface `ClientSessionModel`

    - #### clearExecutionStatus

          public void clearExecutionStatus()

      Specified by:
        `clearExecutionStatus` in interface `ClientSessionModel`

    - #### getAuthenticatedUser

          public UserModel getAuthenticatedUser()

      Specified by:
        `getAuthenticatedUser` in interface `ClientSessionModel`

    - #### setAuthenticatedUser

          public void setAuthenticatedUser(UserModel user)

      Specified by:
        `setAuthenticatedUser` in interface `ClientSessionModel`

    - #### getAuthMethod

          public String getAuthMethod()

      Description copied from interface: `ClientSessionModel`
      Authentication request type, i.e. OAUTH, SAML 2.0, SAML 1.1, etc.
      Specified by:
        `getAuthMethod` in interface `ClientSessionModel`
      Returns:

    - #### setAuthMethod

          public void setAuthMethod(String method)

      Specified by:
        `setAuthMethod` in interface `ClientSessionModel`

    - #### getNote

          public String getNote(String name)

      Specified by:
        `getNote` in interface `ClientSessionModel`

    - #### setNote

          public void setNote(String name,
                              String value)

      Specified by:
        `setNote` in interface `ClientSessionModel`

    - #### removeNote

          public void removeNote(String name)

      Specified by:
        `removeNote` in interface `ClientSessionModel`

    - #### getNotes

          public Map<String,String> getNotes()

      Specified by:
        `getNotes` in interface `ClientSessionModel`

    - #### getRequiredActions

          public Set<String> getRequiredActions()

      Description copied from interface: `ClientSessionModel`
      Required actions that are attached to this client session.
      Specified by:
        `getRequiredActions` in interface `ClientSessionModel`
      Returns:

    - #### addRequiredAction

          public void addRequiredAction(String action)

      Specified by:
        `addRequiredAction` in interface `ClientSessionModel`

    - #### removeRequiredAction

          public void removeRequiredAction(String action)

      Specified by:
        `removeRequiredAction` in interface `ClientSessionModel`

    - #### addRequiredAction

          public void addRequiredAction(UserModel.RequiredAction action)

      Specified by:
        `addRequiredAction` in interface `ClientSessionModel`

    - #### removeRequiredAction

          public void removeRequiredAction(UserModel.RequiredAction action)

      Specified by:
        `removeRequiredAction` in interface `ClientSessionModel`

    - #### setUserSessionNote

          public void setUserSessionNote(String name,
                                         String value)

      Description copied from interface: `ClientSessionModel`
      These are notes you want applied to the UserSessionModel when the client session is attached to it.
      Specified by:
        `setUserSessionNote` in interface `ClientSessionModel`

    - #### getUserSessionNotes

          public Map<String,String> getUserSessionNotes()

      Description copied from interface: `ClientSessionModel`
      These are notes you want applied to the UserSessionModel when the client session is attached to it.
      Specified by:
        `getUserSessionNotes` in interface `ClientSessionModel`
      Returns:

    - #### clearUserSessionNotes

          public void clearUserSessionNotes()

      Specified by:
        `clearUserSessionNotes` in interface `ClientSessionModel`

    - #### equals

          public boolean equals(Object o)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

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