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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user