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 TypeMethodDescriptiongetMonitoredResources(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(String notificationTypeGUID, Map<String, ClassificationProperties> initialClassifications, NotificationProperties firstNotificationProperties, NotificationProperties nextNotificationProperties, NotificationProperties lastNotificationProperties, Map<String, String> requestParameters, String actionRequesterGUID, List<NewActionTarget> actionTargets) Create a notification/action for the subscribers.Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.connectorcontext.ConnectorContextClientBase
getAdditionalProperties, getConnectorGUID, getDeleteOptions, getDisplayName, getDisplayName, getDisplayName, getEffectiveTime, getEgeriaRelease, getGetOptions, getMakeAnchorOptions, 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(String notificationTypeGUID, Map<String, ClassificationProperties> initialClassifications, NotificationProperties firstNotificationProperties, NotificationProperties nextNotificationProperties, NotificationProperties lastNotificationProperties, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionString> requestParameters, String actionRequesterGUID, List<NewActionTarget> actionTargets) Create a notification/action for the subscribers.- Parameters:
notificationTypeGUID- unique identifier of the cause for the action to be raisedinitialClassifications- initial classifications to add to the actionfirstNotificationProperties- properties for the first notification sent to this subscriber by this governance service instancenextNotificationProperties- properties for a follow-on notification sent to this subscriber by this governance service instancelastNotificationProperties- properties for the last notification sent to this subscriber by this governance service instancerequestParameters- firstNotificationProperties to pass to the next governance serviceactionRequesterGUID- unique identifier of the source of the actionactionTargets- the list of elements that should be acted upon- 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
-
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.
-