Search in sources :

Example 1 with AssetTreeModifiedEvent

use of org.openremote.model.asset.AssetTreeModifiedEvent in project openremote by openremote.

the class ManagerKeycloakIdentityProvider method publishModification.

protected void publishModification(PersistenceEvent.Cause cause, Tenant tenant) {
    // Fire persistence event although we don't use database for Tenant CUD but call Keycloak API
    PersistenceEvent persistenceEvent = new PersistenceEvent<>(cause, tenant, new String[0], null);
    messageBrokerService.getProducerTemplate().sendBodyAndHeader(PersistenceEvent.PERSISTENCE_TOPIC, ExchangePattern.InOnly, persistenceEvent, PersistenceEvent.HEADER_ENTITY_TYPE, persistenceEvent.getEntity().getClass());
    clientEventService.publishEvent(new AssetTreeModifiedEvent(timerService.getCurrentTimeMillis(), tenant.getId(), null));
}
Also used : AssetTreeModifiedEvent(org.openremote.model.asset.AssetTreeModifiedEvent) PersistenceEvent(org.openremote.container.persistence.PersistenceEvent)

Aggregations

PersistenceEvent (org.openremote.container.persistence.PersistenceEvent)1 AssetTreeModifiedEvent (org.openremote.model.asset.AssetTreeModifiedEvent)1