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 class
AdminEvent.SearchableFields
-
Constructor Summary
Constructors Constructor Description AdminEvent()
AdminEvent(AdminEvent toCopy)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthDetails
getAuthDetails()
Returns authentication detailsString
getError()
If the event was unsuccessful returns the error message.String
getId()
Returns the UUID of the event.OperationType
getOperationType()
Returns the type of the operationString
getRealmId()
Returns the id of the realmString
getRepresentation()
Returns the updated JSON representation ifoperationType
isCREATE
orUPDATE
.String
getResourcePath()
Returns the path of the resource.ResourceType
getResourceType()
Returns the type of the affectedResourceType
for thisAdminEvent
, e.g.String
getResourceTypeAsString()
Returns the type as string.long
getTime()
Returns the time of the eventvoid
setAuthDetails(AuthDetails authDetails)
void
setError(String error)
void
setId(String id)
void
setOperationType(OperationType operationType)
void
setRealmId(String realmId)
void
setRepresentation(String representation)
void
setResourcePath(String resourcePath)
void
setResourceType(ResourceType resourceType)
void
setResourceTypeAsString(String resourceType)
Setter for custom resource types with values different fromResourceType
.void
setTime(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 ifoperationType
isCREATE
orUPDATE
. 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 fromResourceType
are possible. In this casegetResourceType()
returnsCUSTOM
.- Returns:
-
setResourceTypeAsString
public void setResourceTypeAsString(String resourceType)
Setter for custom resource types with values different fromResourceType
.
-
-