Search in sources :

Example 1 with CreateLinkType

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

the class PusherFacade method createLinkType.

public void createLinkType(@Observes final CreateLinkType createLinkType) {
    if (isEnabled()) {
        try {
            var originalLinkType = new LinkType(createLinkType.getLinkType());
            originalLinkType.setPermissions(new Permissions());
            checkLinkTypesPermissionsChange(originalLinkType, createLinkType.getLinkType());
            sendResourceNotificationByLinkType(linkTypeAdapter.mapLinkTypeComputedProperties(createLinkType.getLinkType()), CREATE_EVENT_SUFFIX);
        } catch (Exception e) {
            log.log(Level.WARNING, "Unable to send push notification: ", e);
        }
    }
}
Also used : Permissions(io.lumeer.api.model.Permissions) LinkType(io.lumeer.api.model.LinkType) RemoveLinkType(io.lumeer.engine.api.event.RemoveLinkType) UpdateLinkType(io.lumeer.engine.api.event.UpdateLinkType) CreateLinkType(io.lumeer.engine.api.event.CreateLinkType)

Aggregations

LinkType (io.lumeer.api.model.LinkType)1 Permissions (io.lumeer.api.model.Permissions)1 CreateLinkType (io.lumeer.engine.api.event.CreateLinkType)1 RemoveLinkType (io.lumeer.engine.api.event.RemoveLinkType)1 UpdateLinkType (io.lumeer.engine.api.event.UpdateLinkType)1