Package org.openmetadata.service.util
Class SubscriptionUtil
- java.lang.Object
-
- org.openmetadata.service.util.SubscriptionUtil
-
public class SubscriptionUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description SubscriptionUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<String>buildReceiversListFromActions(SubscriptionAction action, CreateEventSubscription.SubscriptionType type, CollectionDAO daoCollection, UUID entityId, String entityType)static Set<String>getAdminsData(CreateEventSubscription.SubscriptionType type)static javax.ws.rs.client.ClientgetClient(int connectTimeout, int readTimeout)static org.quartz.CronScheduleBuildergetCronSchedule(TriggerConfig trigger)static intgetNumberOfDays(TriggerConfig trigger)static Set<String>getOwnerOrFollowers(CreateEventSubscription.SubscriptionType type, CollectionDAO daoCollection, UUID entityId, String entityType, Relationship relationship)static List<javax.ws.rs.client.Invocation.Builder>getTargetsForWebhook(SubscriptionAction action, CreateEventSubscription.SubscriptionType type, javax.ws.rs.client.Client client, CollectionDAO daoCollection, ChangeEvent event)static voidpostWebhookMessage(SubscriptionPublisher publisher, javax.ws.rs.client.Invocation.Builder target, Object message)
-
-
-
Method Detail
-
getAdminsData
public static Set<String> getAdminsData(CreateEventSubscription.SubscriptionType type)
-
getOwnerOrFollowers
public static Set<String> getOwnerOrFollowers(CreateEventSubscription.SubscriptionType type, CollectionDAO daoCollection, UUID entityId, String entityType, Relationship relationship)
-
buildReceiversListFromActions
public static Set<String> buildReceiversListFromActions(SubscriptionAction action, CreateEventSubscription.SubscriptionType type, CollectionDAO daoCollection, UUID entityId, String entityType)
-
getTargetsForWebhook
public static List<javax.ws.rs.client.Invocation.Builder> getTargetsForWebhook(SubscriptionAction action, CreateEventSubscription.SubscriptionType type, javax.ws.rs.client.Client client, CollectionDAO daoCollection, ChangeEvent event) throws IOException
- Throws:
IOException
-
postWebhookMessage
public static void postWebhookMessage(SubscriptionPublisher publisher, javax.ws.rs.client.Invocation.Builder target, Object message) throws InterruptedException
- Throws:
InterruptedException
-
getClient
public static javax.ws.rs.client.Client getClient(int connectTimeout, int readTimeout)
-
getCronSchedule
public static org.quartz.CronScheduleBuilder getCronSchedule(TriggerConfig trigger)
-
getNumberOfDays
public static int getNumberOfDays(TriggerConfig trigger)
-
-