Package org.keycloak.models.map.events
Class MapEventStoreProvider
- java.lang.Object
-
- org.keycloak.models.map.events.MapEventStoreProvider
-
- All Implemented Interfaces:
EventListenerProvider
,EventStoreProvider
,Provider
public class MapEventStoreProvider extends Object implements EventStoreProvider
-
-
Constructor Summary
Constructors Constructor Description MapEventStoreProvider(KeycloakSession session, MapStorage<MapAuthEventEntity,Event> loginEventsStore, MapStorage<MapAdminEventEntity,AdminEvent> adminEventsStore)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Removes all auth events from this store provider.void
clear(RealmModel realm)
Removes all auth events for the realm from this store provider.void
clear(RealmModel realm, long olderThan)
Removes all auth events for the realm that are older thanolderThan
from this store provider.void
clearAdmin()
Removes all admin events from this store provider.void
clearAdmin(RealmModel realm)
Removes all auth events for the realm from this store provider.void
clearAdmin(RealmModel realm, long olderThan)
Removes all auth events for the realm that are older thanolderThan
from this store provider.void
clearExpiredEvents()
Clears all expired events in all realmsvoid
close()
AdminEventQuery
createAdminQuery()
Returns an object representing admin event query of typeAdminEventQuery
.EventQuery
createQuery()
Returns an object representing auth event query of typeEventQuery
.void
onEvent(AdminEvent event, boolean includeRepresentation)
ADMIN EVENTSvoid
onEvent(Event event)
LOGIN EVENTS
-
-
-
Constructor Detail
-
MapEventStoreProvider
public MapEventStoreProvider(KeycloakSession session, MapStorage<MapAuthEventEntity,Event> loginEventsStore, MapStorage<MapAdminEventEntity,AdminEvent> adminEventsStore)
-
-
Method Detail
-
onEvent
public void onEvent(Event event)
LOGIN EVENTS- Specified by:
onEvent
in interfaceEventListenerProvider
- Parameters:
event
- to be triggered
-
createQuery
public EventQuery createQuery()
Description copied from interface:EventStoreProvider
Returns an object representing auth event query of typeEventQuery
. The object is used for collecting requested properties of auth events (e.g. realm, operation, resourceType time boundaries, etc.) and contains theEventQuery.getResultStream()
method that returns all objects from this store provider that have given properties.- Specified by:
createQuery
in interfaceEventStoreProvider
- Returns:
- a query object
-
clear
public void clear()
Description copied from interface:EventStoreProvider
Removes all auth events from this store provider.- Specified by:
clear
in interfaceEventStoreProvider
-
clear
public void clear(RealmModel realm)
Description copied from interface:EventStoreProvider
Removes all auth events for the realm from this store provider.- Specified by:
clear
in interfaceEventStoreProvider
- Parameters:
realm
- the realm
-
clear
public void clear(RealmModel realm, long olderThan)
Description copied from interface:EventStoreProvider
Removes all auth events for the realm that are older thanolderThan
from this store provider.- Specified by:
clear
in interfaceEventStoreProvider
- Parameters:
realm
- the realmolderThan
- point in time in milliseconds
-
clearExpiredEvents
public void clearExpiredEvents()
Description copied from interface:EventStoreProvider
Clears all expired events in all realms- Specified by:
clearExpiredEvents
in interfaceEventStoreProvider
-
onEvent
public void onEvent(AdminEvent event, boolean includeRepresentation)
ADMIN EVENTS- Specified by:
onEvent
in interfaceEventListenerProvider
- Parameters:
event
- to be triggeredincludeRepresentation
- when false, event listener should NOT include representation field in the resulting action
-
createAdminQuery
public AdminEventQuery createAdminQuery()
Description copied from interface:EventStoreProvider
Returns an object representing admin event query of typeAdminEventQuery
. The object is used for collecting requested properties of admin events (e.g. realm, operation, resourceType time boundaries, etc.) and contains theAdminEventQuery.getResultStream()
method that returns all objects from this store provider that have given properties.- Specified by:
createAdminQuery
in interfaceEventStoreProvider
- Returns:
- a query object
-
clearAdmin
public void clearAdmin()
Description copied from interface:EventStoreProvider
Removes all admin events from this store provider.- Specified by:
clearAdmin
in interfaceEventStoreProvider
-
clearAdmin
public void clearAdmin(RealmModel realm)
Description copied from interface:EventStoreProvider
Removes all auth events for the realm from this store provider.- Specified by:
clearAdmin
in interfaceEventStoreProvider
- Parameters:
realm
- the realm
-
clearAdmin
public void clearAdmin(RealmModel realm, long olderThan)
Description copied from interface:EventStoreProvider
Removes all auth events for the realm that are older thanolderThan
from this store provider.- Specified by:
clearAdmin
in interfaceEventStoreProvider
- Parameters:
realm
- the realmolderThan
- point in time in milliseconds
-
-