Class IntegrationContextManager
java.lang.Object
org.odpi.openmetadata.frameworks.integration.contextmanager.IntegrationContextManager
- All Implemented Interfaces:
- OpenLineageListenerManager
- Direct Known Subclasses:
- OIFContextManager
public abstract class IntegrationContextManager
extends Object
implements OpenLineageListenerManager
IntegrationContextManager is the base class for the context manager that is implemented by each integration service.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected AssetHandlerprotected AuditLogprotected ConnectedAssetClientprotected GovernanceConfigurationprotected Stringprotected Stringprotected Stringprotected Stringprotected intprotected OpenGovernanceClientprotected OpenMetadataClientprotected OpenMetadataEventClientprotected Stringprotected String
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionabstract voidSuggestion for subclass to create client(s) to partner OMAS.abstract OpenMetadataEventClientcreateEventClient(String connectorId) Suggestion for subclass to create client(s) to partner OMAS.voidinitializeContextManager(String localServerName, String localServiceName, String partnerOMASServerName, String partnerOMASPlatformRootURL, String userId, String password, int maxPageSize, AuditLog auditLog) Initialize server properties for the context manager.voidpublishOpenLineageRunEvent(String rawEvent) Called each time an open lineage run event is published to the integration daemon.voidCalled each time an open lineage run event is published to the integration demon.voidregisterListener(OpenLineageEventListener listener) The listener is implemented by the integration connector.setContext(String connectorId, String connectorName, String connectorUserId, IntegrationConnector integrationConnector, String integrationConnectorGUID, PermittedSynchronization permittedSynchronization, boolean generateIntegrationReport, String metadataSourceQualifiedName, DeleteMethod deleteMethod) Set up the context in the supplied connector.protected StringsetUpMetadataSource(String metadataSourceQualifiedName, String connectorId, String connectorName, String connectorUserId) Retrieve the metadata source's unique identifier (GUID) or if it is not defined, create the software server capability for this service.
- 
Field Details- 
partnerOMASPlatformRootURL
- 
partnerOMASServerName
- 
governanceConfiguration
- 
connectedAssetClient
- 
openMetadataClient
- 
assetHandler
- 
openMetadataEventClient
- 
openGovernanceClient
- 
localServerName
- 
localServiceName
- 
localServerUserId
- 
localServerPassword
- 
maxPageSizeprotected int maxPageSize
- 
auditLog
 
- 
- 
Constructor Details- 
IntegrationContextManagerprotected IntegrationContextManager()Default constructor
 
- 
- 
Method Details- 
initializeContextManagerpublic void initializeContextManager(String localServerName, String localServiceName, String partnerOMASServerName, String partnerOMASPlatformRootURL, String userId, String password, int maxPageSize, AuditLog auditLog) Initialize server properties for the context manager.- Parameters:
- localServerName- name of this integration daemon
- localServiceName- name of calling service
- partnerOMASServerName- name of the server to connect to
- partnerOMASPlatformRootURL- the network address of the server running the OMAS REST services
- userId- caller's userId embedded in all HTTP requests
- password- caller's userId embedded in all HTTP requests
- maxPageSize- maximum number of results that can be returned on a single REST call
- auditLog- logging destination
 
- 
createClientsSuggestion for subclass to create client(s) to partner OMAS.- Throws:
- InvalidParameterException- the subclass is not able to create one of its clients
 
- 
createEventClientpublic abstract OpenMetadataEventClient createEventClient(String connectorId) throws InvalidParameterException Suggestion for subclass to create client(s) to partner OMAS.- Parameters:
- connectorId- used as the caller Id
- Throws:
- InvalidParameterException- the subclass is not able to create one of its clients
 
- 
setUpMetadataSourceprotected String setUpMetadataSource(String metadataSourceQualifiedName, String connectorId, String connectorName, String connectorUserId) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the metadata source's unique identifier (GUID) or if it is not defined, create the software server capability for this service.- Parameters:
- metadataSourceQualifiedName- unique name of the software capability that represents this integration service
- connectorId- unique identifier of the connector (used to configure the event listener)
- connectorName- name of connector from config
- connectorUserId- userId for the connector
- Returns:
- unique identifier of the metadata source
- Throws:
- InvalidParameterException- one of the parameters passed (probably on initialize) is invalid
- UserNotAuthorizedException- the integration daemon's userId does not have access to the partner OMAS
- PropertyServerException- there is a problem in the remote server running the partner OMAS
 
- 
setContextpublic IntegrationContext setContext(String connectorId, String connectorName, String connectorUserId, IntegrationConnector integrationConnector, String integrationConnectorGUID, PermittedSynchronization permittedSynchronization, boolean generateIntegrationReport, String metadataSourceQualifiedName, DeleteMethod deleteMethod) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Set up the context in the supplied connector. This is called between initialize() and start() on the connector.- Parameters:
- connectorId- unique identifier of the connector (used to configure the event listener)
- connectorName- name of connector from config
- connectorUserId- userId for the connector
- integrationConnector- connector created from connection integration service configuration
- integrationConnectorGUID- unique identifier of the integration connector entity (only set if working with integration groups)
- permittedSynchronization- controls the direction(s) that metadata is allowed to flow
- generateIntegrationReport- should the connector generate an integration reports?
- metadataSourceQualifiedName- unique name of the software server capability that represents the metadata source.
- Returns:
- the new integration context
- Throws:
- InvalidParameterException- the connector is not of the correct type
- UserNotAuthorizedException- user not authorized to issue this request
- PropertyServerException- problem accessing the property server
 
- 
registerListenerThe listener is implemented by the integration connector. Once it is registered with the context, its processOpenLineageRunEvent() method is called each time an open lineage event is published to the integration daemon.- Specified by:
- registerListenerin interface- OpenLineageListenerManager
- Parameters:
- listener- listener to call
 
- 
publishOpenLineageRunEventCalled each time an open lineage run event is published to the integration daemon. The integration connector is able to work with the formatted event using the Egeria beans or reformat the open lineage run event using the supplied open lineage backend beans or another set of beans.- Specified by:
- publishOpenLineageRunEventin interface- OpenLineageListenerManager
- Parameters:
- rawEvent- json payload received for the event
 
- 
publishOpenLineageRunEventCalled each time an open lineage run event is published to the integration demon. The integration connector is able to work with the formatted event using the Egeria beans or reformat the open lineage run event using the supplied open lineage backend beans or another set of beans.- Specified by:
- publishOpenLineageRunEventin interface- OpenLineageListenerManager
- Parameters:
- event- bean for the event
 
 
-