Package org.keycloak.events.admin
Class AdminEvent
- java.lang.Object
-
- org.keycloak.events.admin.AdminEvent
-
public class AdminEvent extends Object
- Author:
- Stian Thorgersen
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAdminEvent.SearchableFields
-
Constructor Summary
Constructors Constructor Description AdminEvent()AdminEvent(AdminEvent toCopy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthDetailsgetAuthDetails()Returns authentication detailsStringgetError()If the event was unsuccessful returns the error message.StringgetId()Returns the UUID of the event.OperationTypegetOperationType()Returns the type of the operationStringgetRealmId()Returns the id of the realmStringgetRepresentation()Returns the updated JSON representation ifoperationTypeisCREATEorUPDATE.StringgetResourcePath()Returns the path of the resource.ResourceTypegetResourceType()Returns the type of the affectedResourceTypefor thisAdminEvent, e.g.StringgetResourceTypeAsString()Returns the type as string.longgetTime()Returns the time of the eventvoidsetAuthDetails(AuthDetails authDetails)voidsetError(String error)voidsetId(String id)voidsetOperationType(OperationType operationType)voidsetRealmId(String realmId)voidsetRepresentation(String representation)voidsetResourcePath(String resourcePath)voidsetResourceType(ResourceType resourceType)voidsetResourceTypeAsString(String resourceType)Setter for custom resource types with values different fromResourceType.voidsetTime(long time)
-
-
-
Constructor Detail
-
AdminEvent
public AdminEvent()
-
AdminEvent
public AdminEvent(AdminEvent toCopy)
-
-
Method Detail
-
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 ifoperationTypeisCREATEorUPDATE. Otherwise returnsnull.- Returns:
-
setRepresentation
public void setRepresentation(String representation)
-
getError
public String getError()
If the event was unsuccessful returns the error message. Otherwise returnsnull.- Returns:
-
setError
public void setError(String error)
-
getResourceType
public ResourceType getResourceType()
- Returns:
-
setResourceType
public void setResourceType(ResourceType resourceType)
-
getResourceTypeAsString
public String getResourceTypeAsString()
Returns the type as string. Custom resource types with values different fromResourceTypeare possible. In this casegetResourceType()returnsCUSTOM.- Returns:
-
setResourceTypeAsString
public void setResourceTypeAsString(String resourceType)
Setter for custom resource types with values different fromResourceType.
-
-