Extend event for entity events (#1250)

* Extend event information by it's first interface class and improve constructing the event by providing the directly only.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>

* Check if entity interface is assignable from TenantAwareBaseEntity.

Signed-off-by: Michael Herdt <Michael.Herdt@bosch.io>
This commit is contained in:
Michael Herdt
2022-04-25 15:39:44 +02:00
committed by GitHub
parent 0e6ef2e468
commit 59932b1d6f
38 changed files with 98 additions and 58 deletions

View File

@@ -43,7 +43,7 @@ public class ActionChangedEvent extends RemoteIdEvent implements EntityUpdatedEv
*/
public ActionChangedEvent(final String tenant, final Long targetId, final Long entityId) {
// application id is not needed, because we compose the event ourselves
super(entityId, tenant, Action.class.getName(), null);
super(entityId, tenant, Action.class, null);
this.targetId = targetId;
}

View File

@@ -37,6 +37,6 @@ public class RolloutChangedEvent extends RemoteIdEvent implements EntityUpdatedE
*/
public RolloutChangedEvent(final String tenant, final Long entityId) {
// application id is not needed, because we compose the event ourselves
super(entityId, tenant, Rollout.class.getName(), null);
super(entityId, tenant, Rollout.class, null);
}
}

View File

@@ -43,7 +43,7 @@ public class RolloutGroupChangedEvent extends RemoteIdEvent implements EntityUpd
*/
public RolloutGroupChangedEvent(final String tenant, final Long rolloutId, final Long entityId) {
// application id is not needed, because we compose the event ourselves
super(entityId, tenant, RolloutGroup.class.getName(), null);
super(entityId, tenant, RolloutGroup.class, null);
this.rolloutId = rolloutId;
}