Search in sources :

Example 1 with RemoveSequence

use of io.lumeer.engine.api.event.RemoveSequence in project engine by Lumeer.

the class PusherFacade method removeSequenceNotification.

public void removeSequenceNotification(@Observes final RemoveSequence removeSequence) {
    if (isEnabled()) {
        try {
            Sequence sequence = removeSequence.getSequence();
            Set<String> userIds = permissionAdapter.getProjectUsersByRole(getOrganization(), getProject(), RoleType.TechConfig);
            ResourceId message = new ResourceId(getAppId(), sequence.getId());
            sendNotificationsByUsers(message, userIds, REMOVE_EVENT_SUFFIX);
        } catch (Exception e) {
            log.log(Level.WARNING, "Unable to send push notification: ", e);
        }
    }
}
Also used : Sequence(io.lumeer.api.model.Sequence) RemoveSequence(io.lumeer.engine.api.event.RemoveSequence) CreateOrUpdateSequence(io.lumeer.engine.api.event.CreateOrUpdateSequence)

Aggregations

Sequence (io.lumeer.api.model.Sequence)1 CreateOrUpdateSequence (io.lumeer.engine.api.event.CreateOrUpdateSequence)1 RemoveSequence (io.lumeer.engine.api.event.RemoveSequence)1