Package org.keycloak.events
Class EventBuilder
- java.lang.Object
-
- org.keycloak.events.EventBuilder
-
public class EventBuilder extends Object
- Author:
- Stian Thorgersen
-
-
Constructor Summary
Constructors Constructor Description EventBuilder(RealmModel realm, KeycloakSession session, ClientConnection clientConnection)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EventBuilder
client(String clientId)
EventBuilder
client(ClientModel client)
EventBuilder
clone()
EventBuilder
detail(String key, String value)
EventBuilder
detail(String key, Collection<String> values)
Add event detail where strings from the input Collection are filtered not to containnull
and then joined using::
character.EventBuilder
detail(String key, Stream<String> values)
Add event detail where strings from the input Stream are filtered not to containnull
and then joined using::
character.void
error(String error)
EventBuilder
event(EventType e)
Event
getEvent()
EventBuilder
ipAddress(String ipAddress)
EventBuilder
realm(String realmId)
EventBuilder
realm(RealmModel realm)
EventBuilder
removeDetail(String key)
EventBuilder
session(String sessionId)
EventBuilder
session(UserSessionModel session)
void
success()
EventBuilder
user(String userId)
EventBuilder
user(UserModel user)
-
-
-
Constructor Detail
-
EventBuilder
public EventBuilder(RealmModel realm, KeycloakSession session, ClientConnection clientConnection)
-
-
Method Detail
-
realm
public EventBuilder realm(RealmModel realm)
-
realm
public EventBuilder realm(String realmId)
-
client
public EventBuilder client(ClientModel client)
-
client
public EventBuilder client(String clientId)
-
user
public EventBuilder user(UserModel user)
-
user
public EventBuilder user(String userId)
-
session
public EventBuilder session(UserSessionModel session)
-
session
public EventBuilder session(String sessionId)
-
ipAddress
public EventBuilder ipAddress(String ipAddress)
-
event
public EventBuilder event(EventType e)
-
detail
public EventBuilder detail(String key, String value)
-
detail
public EventBuilder detail(String key, Collection<String> values)
Add event detail where strings from the input Collection are filtered not to containnull
and then joined using::
character.- Parameters:
key
- of the detailvalues
- , can be null- Returns:
- builder for chaining
-
detail
public EventBuilder detail(String key, Stream<String> values)
Add event detail where strings from the input Stream are filtered not to containnull
and then joined using::
character.- Parameters:
key
- of the detailvalues
- , can be null- Returns:
- builder for chaining
-
removeDetail
public EventBuilder removeDetail(String key)
-
getEvent
public Event getEvent()
-
success
public void success()
-
error
public void error(String error)
-
clone
public EventBuilder clone()
-
-