Class RequestedCatalogTargetsManager
java.lang.Object
org.odpi.openmetadata.frameworks.integration.connectors.RequestedCatalogTargetsManager
- All Implemented Interfaces:
CatalogTargetChangeListener
Manages the map of catalog targets that this integration connector is working with. It is also responsible for
keeping the list current. This is the OIF implementation of CatalogTargetChangeListener that is driven from
the connector base. It is also possible for an integration connector to register itself as a listener with this class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidShutdown metadata synchronizationReturn list of the current catalog targets - used in event processing for speed.voidnewCatalogTarget(RequestedCatalogTarget catalogTarget) This catalog target has been created since the last refresh.voidpassEventToCatalogTargets(IntegrationContext integrationContext, OpenMetadataOutTopicEvent event) Retrieve the latest list of catalog targets and call refresh on each one.voidrefreshCatalogTargets(IntegrationContext integrationContext, CatalogTargetFactory catalogTargetFactory) Retrieve the latest list of catalog targets and call refresh on each one.voidAdd a listener.voidremovedCatalogTarget(RequestedCatalogTarget catalogTarget) This catalog target has been removed from the connector.retrieveKnownCatalogTargets(IntegrationContext integrationContext, CatalogTargetFactory catalogTargetFactory) Return a list of requested catalog targets for the connector.voidupdatedCatalogTarget(RequestedCatalogTarget oldCatalogTarget, RequestedCatalogTarget newCatalogTarget) This catalog target has new properties.
-
Constructor Details
-
RequestedCatalogTargetsManager
public RequestedCatalogTargetsManager(Map<String, Object> connectorConfigProperties, String connectorName, AuditLog auditLog) Constructor - passed the values from the integration connector that are needed by each catalog target,- Parameters:
connectorConfigProperties- base configuration properties - these are overlaid with the config properties from the catalog target relationshipconnectorName- can of this connector for error messagesauditLog- audit log for this connector
-
-
Method Details
-
retrieveKnownCatalogTargets
public List<RequestedCatalogTarget> retrieveKnownCatalogTargets(IntegrationContext integrationContext, CatalogTargetFactory catalogTargetFactory) throws ConnectorCheckedException Return a list of requested catalog targets for the connector. These are extracted from the metadata store.- Parameters:
integrationContext- the integration context for the parent connectorcatalogTargetFactory- subclass of connector implementation that is able to create a catalog target processor- Throws:
ConnectorCheckedException- there is a problem with the connector. It is not able to refresh the metadata.
-
refreshCatalogTargets
public void refreshCatalogTargets(IntegrationContext integrationContext, CatalogTargetFactory catalogTargetFactory) throws ConnectorCheckedException, UserNotAuthorizedException Retrieve the latest list of catalog targets and call refresh on each one.- Parameters:
integrationContext- the integration context for the parent connectorcatalogTargetFactory- subclass of connector implementation that is able to create a catalog target processor- Throws:
ConnectorCheckedException- there is a problem with the connector. It is not able to refresh the metadata.UserNotAuthorizedException- connector has been shut down
-
passEventToCatalogTargets
public void passEventToCatalogTargets(IntegrationContext integrationContext, OpenMetadataOutTopicEvent event) throws UserNotAuthorizedException Retrieve the latest list of catalog targets and call refresh on each one.- Parameters:
integrationContext- the integration context for the parent connectorevent- event to pass on to each catalog target that is capable- Throws:
UserNotAuthorizedException- connector has been shut down
-
getRequestedCatalogTargets
Return list of the current catalog targets - used in event processing for speed.- Returns:
- list of the current catalog targets
-
registerCatalogTargetChangeListener
Add a listener.- Parameters:
listener- listener to register
-
newCatalogTarget
public void newCatalogTarget(RequestedCatalogTarget catalogTarget) throws UserNotAuthorizedException, ConnectorCheckedException This catalog target has been created since the last refresh.- Specified by:
newCatalogTargetin interfaceCatalogTargetChangeListener- Parameters:
catalogTarget- new catalog target- Throws:
UserNotAuthorizedException- parent connector has been disconnectedConnectorCheckedException- problem starting up
-
updatedCatalogTarget
public void updatedCatalogTarget(RequestedCatalogTarget oldCatalogTarget, RequestedCatalogTarget newCatalogTarget) This catalog target has new properties.- Specified by:
updatedCatalogTargetin interfaceCatalogTargetChangeListener- Parameters:
oldCatalogTarget- old valuesnewCatalogTarget- new values
-
removedCatalogTarget
public void removedCatalogTarget(RequestedCatalogTarget catalogTarget) throws ConnectorCheckedException This catalog target has been removed from the connector.- Specified by:
removedCatalogTargetin interfaceCatalogTargetChangeListener- Parameters:
catalogTarget- removed relationship- Throws:
ConnectorCheckedException- problem disconnecting
-
disconnect
Shutdown metadata synchronization- Throws:
ConnectorCheckedException- something failed in the super class
-