Class NotificationManagerClient
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
org.odpi.openmetadata.frameworks.opengovernance.connectorcontext.NotificationManagerClient
NotificationHandler is the handler for managing notifications for notification types.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
asOfTimeDefault, auditLog, connectorGUID, connectorUserId, egeriaRelease, externalSourceGUID, externalSourceIsHome, externalSourceName, forDuplicateProcessing, forLineage, governanceZonesFilterDefault, limitResultsByStatusDefault, localServerName, localServiceName, maxPageSize, parentContext, propertyHelper, sequencingOrderDefault, sequencingPropertyDefault, useCurrentEffectiveTime -
Constructor Summary
ConstructorsConstructorDescriptionNotificationManagerClient(ConnectorContextBase parentContext, String localServerName, String localServiceName, String connectorUserId, String connectorGUID, String externalSourceGUID, String externalSourceName, OpenMetadataClient openMetadataClient, OpenGovernanceClient openGovernanceClient, AuditLog auditLog, int maxPageSize) Constructor for connector context client. -
Method Summary
Modifier and TypeMethodDescriptiondismissSubscriber(String subscriberGUID, Map<String, ClassificationProperties> initialClassifications, NotificationProperties outboundNotificationProperties, String notificationTypeGUID, Map<String, String> requestParameters, String actionRequesterGUID, List<NewActionTarget> actionTargets) Create a notification/action for an unsubscribed subscriber.getMonitoredResources(String notificationTypeGUID, QueryOptions queryOptions) Return the list of resources linked to the supplied notification type.getNotificationSubscribers(String notificationTypeGUID, QueryOptions queryOptions) Return the list of subscribers linked to the supplied notification type.voidnotifySubscribers(boolean firstNotification, Map<String, ClassificationProperties> initialClassifications, NotificationProperties properties, String notificationTypeGUID, Map<String, String> requestParameters, String actionRequesterGUID, List<NewActionTarget> actionTargets, long minimumNotificationInterval, Date nextScheduledNotificationTime, ActivityStatus newSubscriberStatus) Create a notification/action for the subscribers.welcomeSubscriber(String subscriberGUID, Map<String, ClassificationProperties> initialClassifications, NotificationProperties outboundNotificationProperties, String notificationTypeGUID, Map<String, String> requestParameters, String actionRequesterGUID, List<NewActionTarget> actionTargets, long minimumNotificationInterval, ActivityStatus newSubscriberStatus) Create a notification/action for the new subscriber.Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
getAdditionalProperties, getConnectorGUID, getDeleteOptions, getDisplayName, getEffectiveTime, getEgeriaRelease, getGetOptions, getMaxPagingSize, getMetadataSourceOptions, getNewElementProperties, getQualifiedName, getQueryOptions, getQueryOptions, getQueryOptions, getQueryOptions, getSearchOptions, getSearchOptions, getSearchOptions, getUpdateOptions, isForDuplicateProcessing, isForLineage, isUseCurrentEffectiveTime, publishElement, setAsOfTimeDefault, setEffectiveTimeDefault, setExternalSource, setExternalSourceIsHome, setForDuplicateProcessing, setForLineage, setGovernanceZonesFilterDefault, setLimitResultsByStatusDefault, setSequencingOrderDefault, setUseCurrentEffectiveTime, withdrawElement
-
Constructor Details
-
NotificationManagerClient
public NotificationManagerClient(ConnectorContextBase parentContext, String localServerName, String localServiceName, String connectorUserId, String connectorGUID, String externalSourceGUID, String externalSourceName, OpenMetadataClient openMetadataClient, OpenGovernanceClient openGovernanceClient, AuditLog auditLog, int maxPageSize) Constructor for connector context client.- Parameters:
parentContext- connector's contextlocalServerName- local server where this client is running - used for error handlinglocalServiceName- local service that his connector is hosted by - used for error handlingconnectorUserId- the userId to use with all requests for open metadataconnectorGUID- the unique identifier that represents this connector in open metadataexternalSourceGUID- unique identifier of the software server capability for the source of metadataexternalSourceName- unique name of the software server capability for the source of metadataopenMetadataClient- client to access open metadataopenGovernanceClient- client to access open governance servicesauditLog- logging destinationmaxPageSize- max number of elements that can be returned on a query
-
-
Method Details
-
getMonitoredResources
public List<OpenMetadataRootElement> getMonitoredResources(String notificationTypeGUID, QueryOptions queryOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the list of resources linked to the supplied notification type.- Parameters:
notificationTypeGUID- unique identifier of the notification typequeryOptions- options to control the query- Returns:
- list of resources to monitor
- Throws:
InvalidParameterException- one of the parameters is null or invalid.PropertyServerException- a problem retrieving information from the property server(s).UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-
notifySubscribers
public void notifySubscribers(boolean firstNotification, Map<String, ClassificationProperties> initialClassifications, NotificationProperties properties, String notificationTypeGUID, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionString> requestParameters, String actionRequesterGUID, List<NewActionTarget> actionTargets, long minimumNotificationInterval, Date nextScheduledNotificationTime, ActivityStatus newSubscriberStatus) Create a notification/action for the subscribers.- Parameters:
properties- properties of the actionfirstNotification- is this the first notification sent to this subscriber by this governance service instance?notificationTypeGUID- unique identifier of the cause for the action to be raisedinitialClassifications- initial classifications to add to the actionrequestParameters- properties to pass to the next governance serviceactionRequesterGUID- unique identifier of the source of the actionactionTargets- the list of elements that should be acted uponminimumNotificationInterval- minimum time between notificationsnextScheduledNotificationTime- next notification trigger time - either from the notification type or monitored resource activitynewSubscriberStatus- set the subscriber relationship to this value after a successful notification; null means leave it alone- Throws:
InvalidParameterException- the completion status is nullUserNotAuthorizedException- the governance action service is not authorized to update the governance action service statusPropertyServerException- a problem connecting to the metadata store
-
welcomeSubscriber
public String welcomeSubscriber(String subscriberGUID, Map<String, ClassificationProperties> initialClassifications, NotificationProperties outboundNotificationProperties, String notificationTypeGUID, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionString> requestParameters, String actionRequesterGUID, List<NewActionTarget> actionTargets, long minimumNotificationInterval, ActivityStatus newSubscriberStatus) Create a notification/action for the new subscriber.- Parameters:
subscriberGUID- unique identifier of the subscriberoutboundNotificationProperties- properties of the actioninitialClassifications- initial classifications to add to the actionnotificationTypeGUID- unique identifier of the cause for the action to be raisedrequestParameters- properties to pass to any governance action subscriberactionRequesterGUID- unique identifier of the source of the actionactionTargets- the list of elements that should be acted uponminimumNotificationInterval- minimum time between notificationsnewSubscriberStatus- set the subscriber relationship to this value after a successful notification; null means leave it alone- Returns:
- unique identifier of the action
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to continuePropertyServerException- a problem connecting to the metadata store
-
dismissSubscriber
public String dismissSubscriber(String subscriberGUID, Map<String, ClassificationProperties> initialClassifications, NotificationProperties outboundNotificationProperties, String notificationTypeGUID, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionString> requestParameters, String actionRequesterGUID, List<NewActionTarget> actionTargets) Create a notification/action for an unsubscribed subscriber.- Parameters:
subscriberGUID- unique identifier of the subscriberoutboundNotificationProperties- properties of the actioninitialClassifications- initial classifications to add to the actionnotificationTypeGUID- unique identifier of the cause for the action to be raisedrequestParameters- properties to pass to any governance action subscriberactionRequesterGUID- unique identifier of the source of the actionactionTargets- the list of elements that should be acted upon- Returns:
- unique identifier of the action
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to continuePropertyServerException- a problem connecting to the metadata store
-
getNotificationSubscribers
public List<OpenMetadataRootElement> getNotificationSubscribers(String notificationTypeGUID, QueryOptions queryOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the list of subscribers linked to the supplied notification type.- Parameters:
notificationTypeGUID- unique identifier of the notification typequeryOptions- options to control the query- Returns:
- list of resources to monitor
- Throws:
InvalidParameterException- one of the parameters is null or invalid.PropertyServerException- a problem retrieving information from the property server(s).UserNotAuthorizedException- the requesting user is not authorized to issue this request.
-