Class AdminEvent

java.lang.Object
org.keycloak.events.admin.AdminEvent

public class AdminEvent extends Object
Author:
Stian Thorgersen
  • Constructor Details

    • AdminEvent

      public AdminEvent()
    • AdminEvent

      public AdminEvent(AdminEvent toCopy)
  • Method Details

    • getId

      public String getId()
      Returns the UUID of the event.
      Returns:
    • setId

      public void setId(String id)
    • getTime

      public long getTime()
      Returns the time of the event
      Returns:
      time in millis
    • setTime

      public void setTime(long time)
    • getRealmId

      public String getRealmId()
      Returns the id of the realm
      Returns:
    • setRealmId

      public void setRealmId(String realmId)
    • getAuthDetails

      public AuthDetails getAuthDetails()
      Returns authentication details
      Returns:
    • setAuthDetails

      public void setAuthDetails(AuthDetails authDetails)
    • getOperationType

      public OperationType getOperationType()
      Returns the type of the operation
      Returns:
    • setOperationType

      public void setOperationType(OperationType operationType)
    • getResourcePath

      public String getResourcePath()
      Returns the path of the resource. For example:
      • realms - realm list
      • realms/master - master realm
      • realms/clients/00d4b16f-f1f9-4e73-8366-d76b18f3e0e1 - client within the master realm
      Returns:
    • setResourcePath

      public void setResourcePath(String resourcePath)
    • getRepresentation

      public String getRepresentation()
      Returns the updated JSON representation if operationType is CREATE or UPDATE. Otherwise returns null.
      Returns:
    • setRepresentation

      public void setRepresentation(String representation)
    • getError

      public String getError()
      If the event was unsuccessful returns the error message. Otherwise returns null.
      Returns:
    • setError

      public void setError(String error)
    • getResourceType

      public ResourceType getResourceType()
      Returns the type of the affected ResourceType for this AdminEvent, e.g. USER, GROUP etc.
      Returns:
    • setResourceType

      public void setResourceType(ResourceType resourceType)
    • getResourceTypeAsString

      public String getResourceTypeAsString()
      Returns the type as string. Custom resource types with values different from ResourceType are possible. In this case getResourceType() returns CUSTOM.
      Returns:
    • setResourceTypeAsString

      public void setResourceTypeAsString(String resourceType)
      Setter for custom resource types with values different from ResourceType.