From 47ffce02125f049df15318e8b08e58c83e03035d Mon Sep 17 00:00:00 2001 From: Mandy Chessell Date: Mon, 20 Mar 2023 14:20:16 +0000 Subject: [PATCH] Add integration report havesting to data manager based OMISs Signed-off-by: Mandy Chessell --- .../IntegrationConnectorConfig.java | 4 +- .../context/IntegrationContext.java | 53 +- .../context/OpenMetadataAccess.java | 132 ++- .../IntegrationContextManager.java | 36 +- .../connector/AnalyticsIntegratorContext.java | 6 +- .../AnalyticsIntegratorContextManager.java | 7 - .../api/connector/APIIntegratorContext.java | 869 +++++++++++++- .../APIIntegratorContextManager.java | 13 +- .../connector/CatalogIntegratorContext.java | 6 +- .../CatalogIntegratorContextManager.java | 7 - .../connector/DatabaseIntegratorContext.java | 994 +++++++++++++++- .../DatabaseIntegratorContextManager.java | 14 +- .../connector/DisplayIntegratorContext.java | 265 ++++- .../DisplayIntegratorContextManager.java | 8 - .../connector/FilesIntegratorContext.java | 1050 ++++++++++++++++- .../FilesIntegratorContextManager.java | 16 +- .../InfrastructureIntegratorContext.java | 6 +- ...nfrastructureIntegratorContextManager.java | 7 - .../connector/LineageIntegratorContext.java | 6 +- .../LineageIntegratorContextManager.java | 8 - .../OrganizationIntegratorContext.java | 6 +- .../OrganizationIntegratorContextManager.java | 8 - .../connector/SearchIntegratorContext.java | 6 +- .../SearchIntegratorContextManager.java | 4 - .../connector/SecurityIntegratorContext.java | 6 +- .../SecurityIntegratorContextManager.java | 8 - .../connector/TopicIntegratorContext.java | 504 +++++++- .../TopicIntegratorContextManager.java | 7 - 28 files changed, 3628 insertions(+), 428 deletions(-) diff --git a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/IntegrationConnectorConfig.java b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/IntegrationConnectorConfig.java index 8ec409d4b9d..376d6b3277d 100644 --- a/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/IntegrationConnectorConfig.java +++ b/open-metadata-implementation/admin-services/admin-services-api/src/main/java/org/odpi/openmetadata/adminservices/configuration/properties/IntegrationConnectorConfig.java @@ -44,7 +44,7 @@ public class IntegrationConnectorConfig extends AdminServicesConfigHeader private long refreshTimeInterval = 0L; private boolean usesBlockingCalls = false; private PermittedSynchronization permittedSynchronization = null; - private boolean generateIntegrationReports = true; + private boolean generateIntegrationReports = false; /** @@ -272,7 +272,7 @@ public void setPermittedSynchronization(PermittedSynchronization permittedSynchr /** * Return a flag indicating whether the integration connector should create an integration report. * - * @return boolean flag (default = true) + * @return boolean flag (default = false) */ public boolean getGenerateIntegrationReports() { diff --git a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/IntegrationContext.java b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/IntegrationContext.java index ec0bf3435b3..4886532fb20 100644 --- a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/IntegrationContext.java +++ b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/IntegrationContext.java @@ -32,9 +32,8 @@ public class IntegrationContext protected final String integrationConnectorGUID; protected final PermittedSynchronization permittedSynchronization; - private final IntegrationGovernanceContext integrationGovernanceContext; - - private final IntegrationReportWriter integrationReportWriter; + private final IntegrationGovernanceContext integrationGovernanceContext; + protected final IntegrationReportWriter integrationReportWriter; /** @@ -51,7 +50,6 @@ public class IntegrationContext * @param externalSourceGUID unique identifier of the software server capability for the source of metadata * @param externalSourceName unique name of the software server capability for the source of metadata * @param integrationConnectorGUID unique identifier of the integration connector entity (maybe null) - * @param integrationGovernanceContext populated governance context for the connector's use */ public IntegrationContext(String connectorId, String connectorName, @@ -63,8 +61,7 @@ public IntegrationContext(String connectorId, PermittedSynchronization permittedSynchronization, String externalSourceGUID, String externalSourceName, - String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext) + String integrationConnectorGUID) { this.openIntegrationClient = openIntegrationClient; this.openMetadataStoreClient = openMetadataStoreClient; @@ -73,7 +70,6 @@ public IntegrationContext(String connectorId, this.externalSourceGUID = externalSourceGUID; this.externalSourceName = externalSourceName; this.integrationConnectorGUID = integrationConnectorGUID; - this.integrationGovernanceContext = integrationGovernanceContext; if (generateIntegrationReport) { @@ -88,9 +84,52 @@ public IntegrationContext(String connectorId, { this.integrationReportWriter = null; } + + this.integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, + connectorUserId, + externalSourceGUID, + externalSourceName, + integrationReportWriter); + + } + + + + /** + * Return a new integrationGovernanceContext for a specific connector. + * + * @param openMetadataStore client implementation + * @param userId calling user + * @param externalSourceGUID unique identifier for external source (or null) + * @param externalSourceName unique name for external source (or null) + * @param integrationReportWriter report writer (maybe null) + * @return new context + */ + private IntegrationGovernanceContext constructIntegrationGovernanceContext(OpenMetadataClient openMetadataStore, + String userId, + String externalSourceGUID, + String externalSourceName, + IntegrationReportWriter integrationReportWriter) + { + if (openMetadataStoreClient != null) + { + OpenMetadataAccess openMetadataAccess = new OpenMetadataAccess(openMetadataStore, + userId, + externalSourceGUID, + externalSourceName, + integrationReportWriter); + MultiLanguageManagement multiLanguageManagement = new MultiLanguageManagement(openMetadataStore, userId); + StewardshipAction stewardshipAction = new StewardshipAction(openMetadataStore, userId); + ValidMetadataValues validMetadataValues = new ValidMetadataValues(openMetadataStore, userId); + + return new IntegrationGovernanceContext(openMetadataAccess, multiLanguageManagement, stewardshipAction, validMetadataValues); + } + + return null; } + /** * Retrieve the identifiers of the metadata elements identified as catalog targets with an integration connector. * Each catalog target may be configured with an optional symbolic name to guide the integration connector on how to use diff --git a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/OpenMetadataAccess.java b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/OpenMetadataAccess.java index 5a474855c63..212b69622a3 100644 --- a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/OpenMetadataAccess.java +++ b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/context/OpenMetadataAccess.java @@ -14,6 +14,7 @@ import org.odpi.openmetadata.frameworks.governanceaction.search.SearchClassifications; import org.odpi.openmetadata.frameworks.governanceaction.search.SearchProperties; import org.odpi.openmetadata.frameworks.governanceaction.search.SequencingOrder; +import org.odpi.openmetadata.frameworks.integration.reports.IntegrationReportWriter; import java.util.Date; import java.util.List; @@ -25,10 +26,11 @@ */ public class OpenMetadataAccess { - private final OpenMetadataClient openMetadataStore; - private final String userId; - private final String externalSourceGUID; - private final String externalSourceName; + private final OpenMetadataClient openMetadataStore; + private final String userId; + private final String externalSourceGUID; + private final String externalSourceName; + private final IntegrationReportWriter reportWriter; /** @@ -38,16 +40,19 @@ public class OpenMetadataAccess * @param userId calling user * @param externalSourceGUID unique identifier for external source (or null) * @param externalSourceName unique name for external source (or null) + * @param reportWriter report writer (maybe null) */ - public OpenMetadataAccess(OpenMetadataClient openMetadataStore, - String userId, - String externalSourceGUID, - String externalSourceName) + public OpenMetadataAccess(OpenMetadataClient openMetadataStore, + String userId, + String externalSourceGUID, + String externalSourceName, + IntegrationReportWriter reportWriter) { this.openMetadataStore = openMetadataStore; this.userId = userId; this.externalSourceGUID = externalSourceGUID; this.externalSourceName = externalSourceName; + this.reportWriter = reportWriter; } @@ -340,15 +345,22 @@ public String createMetadataElementInStore(String metadataElementType UserNotAuthorizedException, PropertyServerException { - return openMetadataStore.createMetadataElementInStore(userId, - externalSourceGUID, - externalSourceName, - metadataElementTypeName, - initialStatus, - effectiveFrom, - effectiveTo, - properties, - templateGUID); + String metadataElementGUID = openMetadataStore.createMetadataElementInStore(userId, + externalSourceGUID, + externalSourceName, + metadataElementTypeName, + initialStatus, + effectiveFrom, + effectiveTo, + properties, + templateGUID); + + if ((metadataElementGUID != null) && (reportWriter != null)) + { + reportWriter.reportElementCreation(metadataElementGUID); + } + + return metadataElementGUID; } @@ -387,6 +399,11 @@ public void updateMetadataElementInStore(String metadataElementGUID, forDuplicateProcessing, properties, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementUpdate(metadataElementGUID); + } } @@ -420,6 +437,11 @@ public void updateMetadataElementStatusInStore(String metadataElementGUID forDuplicateProcessing, newElementStatus, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementUpdate(metadataElementGUID); + } } @@ -456,6 +478,11 @@ public void updateMetadataElementEffectivityInStore(String metadataElemen effectiveFrom, effectiveTo, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementUpdate(metadataElementGUID); + } } @@ -485,6 +512,11 @@ public void deleteMetadataElementInStore(String metadataElementGUID, forLineage, forDuplicateProcessing, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementDelete(metadataElementGUID); + } } @@ -529,6 +561,11 @@ public void classifyMetadataElementInStore(String metadataElementGUID effectiveTo, properties, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementUpdate(metadataElementGUID); + } } @@ -569,6 +606,11 @@ public void reclassifyMetadataElementInStore(String metadataElementGU forDuplicateProcessing, properties, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementUpdate(metadataElementGUID); + } } @@ -608,6 +650,11 @@ public void updateClassificationEffectivityInStore(String metadataElementGUID, effectiveFrom, effectiveTo, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementUpdate(metadataElementGUID); + } } @@ -640,6 +687,11 @@ public void declassifyMetadataElementInStore(String metadataElementGUID, forLineage, forDuplicateProcessing, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementUpdate(metadataElementGUID); + } } @@ -677,18 +729,25 @@ public String createRelatedElementsInStore(String relationshipTypeNam UserNotAuthorizedException, PropertyServerException { - return openMetadataStore.createRelatedElementsInStore(userId, - externalSourceGUID, - externalSourceName, - relationshipTypeName, - metadataElement1GUID, - metadataElement2GUID, - forLineage, - forDuplicateProcessing, - effectiveFrom, - effectiveTo, - properties, - effectiveTime); + String relationshipGUID = openMetadataStore.createRelatedElementsInStore(userId, + externalSourceGUID, + externalSourceName, + relationshipTypeName, + metadataElement1GUID, + metadataElement2GUID, + forLineage, + forDuplicateProcessing, + effectiveFrom, + effectiveTo, + properties, + effectiveTime); + + if ((relationshipGUID != null) && (reportWriter != null)) + { + reportWriter.reportElementCreation(relationshipGUID); + } + + return relationshipGUID; } @@ -726,6 +785,11 @@ public void updateRelatedElementsInStore(String relationshipGUID, forDuplicateProcessing, properties, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementUpdate(relationshipGUID); + } } @@ -763,6 +827,11 @@ public void updateRelatedElementsEffectivityInStore(String relationshipGUID, effectiveFrom, effectiveTo, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementUpdate(relationshipGUID); + } } @@ -792,5 +861,10 @@ public void deleteRelatedElementsInStore(String relationshipGUID, forLineage, forDuplicateProcessing, effectiveTime); + + if (reportWriter != null) + { + reportWriter.reportElementDelete(relationshipGUID); + } } } \ No newline at end of file diff --git a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/contextmanager/IntegrationContextManager.java b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/contextmanager/IntegrationContextManager.java index 6c94246f363..ebc1f6a819c 100644 --- a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/contextmanager/IntegrationContextManager.java +++ b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/contextmanager/IntegrationContextManager.java @@ -77,34 +77,6 @@ public void createClients() throws InvalidParameterException } - /** - * Return a new integrationGovernanceContext for a specific connector. - * - * @param openMetadataStore client implementation - * @param userId calling user - * @param externalSourceGUID unique identifier for external source (or null) - * @param externalSourceName unique name for external source (or null) - * @return new context - */ - protected IntegrationGovernanceContext constructIntegrationGovernanceContext(OpenMetadataClient openMetadataStore, - String userId, - String externalSourceGUID, - String externalSourceName) - { - if (openMetadataStoreClient != null) - { - OpenMetadataAccess openMetadataAccess = new OpenMetadataAccess(openMetadataStore, userId, externalSourceGUID, externalSourceName); - MultiLanguageManagement multiLanguageManagement = new MultiLanguageManagement(openMetadataStore, userId); - StewardshipAction stewardshipAction = new StewardshipAction(openMetadataStore, userId); - ValidMetadataValues validMetadataValues = new ValidMetadataValues(openMetadataStore, userId); - - return new IntegrationGovernanceContext(openMetadataAccess, multiLanguageManagement, stewardshipAction, validMetadataValues); - } - - return null; - } - - /** * Retrieve the metadata source's unique identifier (GUID) or if it is not defined, create the software server capability * for this event broker. @@ -182,11 +154,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - if ((openIntegrationClient != null) && (openMetadataStoreClient != null)) { integrationContext = new IntegrationContext(connectorId, @@ -199,8 +166,7 @@ public IntegrationContext setContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); } integrationConnector.setContext(integrationContext); diff --git a/open-metadata-implementation/integration-services/analytics-integrator/analytics-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/analytics/connector/AnalyticsIntegratorContext.java b/open-metadata-implementation/integration-services/analytics-integrator/analytics-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/analytics/connector/AnalyticsIntegratorContext.java index 01d09fbe4fc..402a92209d1 100644 --- a/open-metadata-implementation/integration-services/analytics-integrator/analytics-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/analytics/connector/AnalyticsIntegratorContext.java +++ b/open-metadata-implementation/integration-services/analytics-integrator/analytics-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/analytics/connector/AnalyticsIntegratorContext.java @@ -6,7 +6,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; @@ -28,7 +27,6 @@ public class AnalyticsIntegratorContext extends IntegrationContext * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the api manager * @param externalSourceName unique name of the software server capability for the api manager */ @@ -41,7 +39,6 @@ public AnalyticsIntegratorContext(String connectorId, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName) { @@ -55,8 +52,7 @@ public AnalyticsIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); } diff --git a/open-metadata-implementation/integration-services/analytics-integrator/analytics-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/analytics/contextmanager/AnalyticsIntegratorContextManager.java b/open-metadata-implementation/integration-services/analytics-integrator/analytics-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/analytics/contextmanager/AnalyticsIntegratorContextManager.java index 7ccc5801594..2d25909e634 100644 --- a/open-metadata-implementation/integration-services/analytics-integrator/analytics-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/analytics/contextmanager/AnalyticsIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/analytics-integrator/analytics-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/analytics/contextmanager/AnalyticsIntegratorContextManager.java @@ -11,7 +11,6 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnector; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.IntegrationContextManager; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.governanceservers.integrationdaemonservices.registration.IntegrationServiceDescription; @@ -141,11 +140,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - AnalyticsIntegratorContext integratorContext = new AnalyticsIntegratorContext(connectorId, connectorName, connectorUserId, @@ -155,7 +149,6 @@ public IntegrationContext setContext(String connectorId, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName); serviceSpecificConnector.setContext(integratorContext); diff --git a/open-metadata-implementation/integration-services/api-integrator/api-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/api/connector/APIIntegratorContext.java b/open-metadata-implementation/integration-services/api-integrator/api-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/api/connector/APIIntegratorContext.java index e4bb36dcc55..92bcd8b59ee 100644 --- a/open-metadata-implementation/integration-services/api-integrator/api-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/api/connector/APIIntegratorContext.java +++ b/open-metadata-implementation/integration-services/api-integrator/api-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/api/connector/APIIntegratorContext.java @@ -7,6 +7,7 @@ import org.odpi.openmetadata.accessservices.datamanager.client.APIManagerClient; import org.odpi.openmetadata.accessservices.datamanager.client.ConnectionManagerClient; import org.odpi.openmetadata.accessservices.datamanager.client.DataManagerEventClient; +import org.odpi.openmetadata.accessservices.datamanager.client.ValidValueManagement; import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; import org.odpi.openmetadata.accessservices.datamanager.properties.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.*; @@ -14,7 +15,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import java.util.List; @@ -27,7 +27,8 @@ public class APIIntegratorContext extends IntegrationContext { private final APIManagerClient apiManagerClient; private final ConnectionManagerClient connectionManagerClient; - private final DataManagerEventClient eventClient; + private final DataManagerEventClient eventClient; + private final ValidValueManagement validValueManagement; /** @@ -41,11 +42,11 @@ public class APIIntegratorContext extends IntegrationContext * @param openMetadataStoreClient client for calling the metadata server * @param apiManagerClient client to map request to * @param connectionManagerClient client to manage connections in the metadata server + * @param validValueManagement client for managing valid value sets and definitions * @param eventClient client to register for events * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the api manager * @param externalSourceName unique name of the software server capability for the api manager */ @@ -57,11 +58,11 @@ public APIIntegratorContext(String connectorId, OpenMetadataClient openMetadataStoreClient, APIManagerClient apiManagerClient, ConnectionManagerClient connectionManagerClient, + ValidValueManagement validValueManagement, DataManagerEventClient eventClient, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName) { @@ -75,11 +76,11 @@ public APIIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); this.apiManagerClient = apiManagerClient; this.connectionManagerClient = connectionManagerClient; + this.validValueManagement = validValueManagement; this.eventClient = eventClient; } @@ -167,7 +168,14 @@ public String createEndpoint(EndpointProperties endpointProperties) throws Inval UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createEndpoint(userId, null, null, endpointProperties); + String endpointGUID = connectionManagerClient.createEndpoint(userId, null, null, endpointProperties); + + if ((endpointGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(endpointGUID); + } + + return endpointGUID; } @@ -190,7 +198,19 @@ public String createEndpointFromTemplate(String networkAddress, UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createEndpointFromTemplate(userId, null, null, networkAddress, templateGUID, templateProperties); + String endpointGUID = connectionManagerClient.createEndpointFromTemplate(userId, + null, + null, + networkAddress, + templateGUID, + templateProperties); + + if ((endpointGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(endpointGUID); + } + + return endpointGUID; } @@ -213,6 +233,11 @@ public void updateEndpoint(boolean isMergeUpdate, PropertyServerException { connectionManagerClient.updateEndpoint(userId, externalSourceGUID, externalSourceName, isMergeUpdate, endpointGUID, endpointProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(endpointGUID); + } } @@ -230,6 +255,11 @@ public void removeEndpoint(String endpointGUID) throws InvalidParameterException PropertyServerException { connectionManagerClient.removeEndpoint(userId, externalSourceGUID, externalSourceName, endpointGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(endpointGUID); + } } @@ -322,7 +352,20 @@ public String createAPI(String endpointGUID, UserNotAuthorizedException, PropertyServerException { - return apiManagerClient.createAPI(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, endpointGUID, apiProperties); + String apiGUID = apiManagerClient.createAPI(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + endpointGUID, + apiProperties); + + if ((apiGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(apiGUID, apiGUID); + integrationReportWriter.reportElementCreation(apiGUID); + } + + return apiGUID; } @@ -345,13 +388,21 @@ public String createAPIFromTemplate(String endpointGUID, UserNotAuthorizedException, PropertyServerException { - return apiManagerClient.createAPIFromTemplate(userId, - externalSourceGUID, - externalSourceName, - externalSourceIsHome, - endpointGUID, - templateGUID, - templateProperties); + String apiGUID = apiManagerClient.createAPIFromTemplate(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + endpointGUID, + templateGUID, + templateProperties); + + if ((apiGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(apiGUID, apiGUID); + integrationReportWriter.reportElementCreation(apiGUID); + } + + return apiGUID; } @@ -373,6 +424,12 @@ public void updateAPI(String apiGUID, PropertyServerException { apiManagerClient.updateAPI(userId, externalSourceGUID, externalSourceName, apiGUID, isMergeUpdate, apiProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(apiGUID, apiGUID); + integrationReportWriter.reportElementUpdate(apiGUID); + } } @@ -392,6 +449,12 @@ public void publishAPI(String apiGUID) throws InvalidParameterException, PropertyServerException { apiManagerClient.publishAPI(userId, apiGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(apiGUID, apiGUID); + integrationReportWriter.reportElementUpdate(apiGUID); + } } @@ -411,6 +474,12 @@ public void withdrawAPI(String apiGUID) throws InvalidParameterException, PropertyServerException { apiManagerClient.withdrawAPI(userId, apiGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(apiGUID, apiGUID); + integrationReportWriter.reportElementUpdate(apiGUID); + } } @@ -430,6 +499,12 @@ public void removeAPI(String apiGUID, PropertyServerException { apiManagerClient.removeAPI(userId, externalSourceGUID, externalSourceName, apiGUID, qualifiedName); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(apiGUID, apiGUID); + integrationReportWriter.reportElementDelete(apiGUID); + } } @@ -546,14 +621,24 @@ public String createAPIOperation(String apiGUID, UserNotAuthorizedException, PropertyServerException { + String apiOperationGUID; if (externalSourceIsHome) { - return apiManagerClient.createAPIOperation(userId, externalSourceGUID, externalSourceName, apiGUID, apiOperationProperties); + apiOperationGUID = apiManagerClient.createAPIOperation(userId, externalSourceGUID, externalSourceName, apiGUID, apiOperationProperties); } else { - return apiManagerClient.createAPIOperation(userId, null, null, apiGUID, apiOperationProperties); + apiOperationGUID = apiManagerClient.createAPIOperation(userId, null, null, apiGUID, apiOperationProperties); + } + + if ((apiOperationGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(apiGUID, apiGUID); + integrationReportWriter.setAnchor(apiOperationGUID, apiGUID); + integrationReportWriter.reportElementCreation(apiOperationGUID); } + + return apiOperationGUID; } @@ -576,14 +661,34 @@ public String createAPIOperationFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { + String apiOperationGUID; if (externalSourceIsHome) { - return apiManagerClient.createAPIOperationFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, apiGUID, templateProperties); + apiOperationGUID = apiManagerClient.createAPIOperationFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + apiGUID, + templateProperties); } else { - return apiManagerClient.createAPIOperationFromTemplate(userId, null, null, templateGUID, apiGUID, templateProperties); + apiOperationGUID = apiManagerClient.createAPIOperationFromTemplate(userId, + null, + null, + templateGUID, + apiGUID, + templateProperties); + } + + if ((apiOperationGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(apiGUID, apiGUID); + integrationReportWriter.setAnchor(apiOperationGUID, apiGUID); + integrationReportWriter.reportElementCreation(apiOperationGUID); } + + return apiOperationGUID; } @@ -605,6 +710,11 @@ public void updateAPIOperation(String apiOperationGUID, PropertyServerException { apiManagerClient.updateAPIOperation(userId, externalSourceGUID, externalSourceName, apiOperationGUID, isMergeUpdate, apiOperationProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(apiOperationGUID); + } } @@ -624,6 +734,11 @@ public void removeAPIOperation(String apiOperationGUID, PropertyServerException { apiManagerClient.removeAPIOperation(userId, externalSourceGUID, externalSourceName, apiOperationGUID, qualifiedName); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(apiOperationGUID); + } } @@ -743,14 +858,32 @@ public String createAPIParameterList(String apiOperationGUID UserNotAuthorizedException, PropertyServerException { + String apiParameterListGUID; if (externalSourceIsHome) { - return apiManagerClient.createAPIParameterList(userId, externalSourceGUID, externalSourceName, apiOperationGUID, parameterListType, properties); + apiParameterListGUID = apiManagerClient.createAPIParameterList(userId, + externalSourceGUID, + externalSourceName, + apiOperationGUID, + parameterListType, + properties); } else { - return apiManagerClient.createAPIParameterList(userId, null, null, apiOperationGUID, parameterListType, properties); + apiParameterListGUID = apiManagerClient.createAPIParameterList(userId, + null, + null, + apiOperationGUID, + parameterListType, + properties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(apiParameterListGUID, apiOperationGUID); } + + return apiParameterListGUID; } @@ -775,14 +908,36 @@ public String createAPIParameterListFromTemplate(String templateGU UserNotAuthorizedException, PropertyServerException { + String apiParameterListGUID; + if (externalSourceIsHome) { - return apiManagerClient.createAPIParameterListFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, apiOperationGUID, parameterListType, templateProperties); + apiParameterListGUID = apiManagerClient.createAPIParameterListFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + apiOperationGUID, + parameterListType, + templateProperties); } else { - return apiManagerClient.createAPIParameterListFromTemplate(userId, null, null, templateGUID, apiOperationGUID, parameterListType, templateProperties); + apiParameterListGUID = apiManagerClient.createAPIParameterListFromTemplate(userId, + null, + null, + templateGUID, + apiOperationGUID, + parameterListType, + templateProperties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(apiParameterListGUID, apiOperationGUID); + integrationReportWriter.reportElementCreation(apiParameterListGUID); } + + return apiParameterListGUID; } @@ -805,6 +960,11 @@ public void updateAPIParameterList(String apiParameterListGU PropertyServerException { apiManagerClient.updateAPIParameterList(userId, externalSourceGUID, externalSourceName, apiParameterListGUID, isMergeUpdate, properties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(apiParameterListGUID); + } } @@ -824,6 +984,11 @@ public void removeAPIParameterList(String apiParameterListGUID, PropertyServerException { apiManagerClient.removeAPIParameterList(userId, externalSourceGUID, externalSourceName, apiParameterListGUID, qualifiedName); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(apiParameterListGUID); + } } @@ -936,17 +1101,35 @@ public APIParameterListElement getAPIParameterListByGUID(String guid) throws Inv */ public String createAPIParameter(String schemaElementGUID, APIParameterProperties apiParameterProperties) throws InvalidParameterException, - UserNotAuthorizedException, - PropertyServerException + UserNotAuthorizedException, + PropertyServerException { + String apiParameterGUID; + if (externalSourceIsHome) { - return apiManagerClient.createAPIParameter(userId, externalSourceGUID, externalSourceName, schemaElementGUID, apiParameterProperties); + apiParameterGUID = apiManagerClient.createAPIParameter(userId, + externalSourceGUID, + externalSourceName, + schemaElementGUID, + apiParameterProperties); } else { - return apiManagerClient.createAPIParameter(userId, null, null, schemaElementGUID, apiParameterProperties); + apiParameterGUID = apiManagerClient.createAPIParameter(userId, + null, + null, + schemaElementGUID, + apiParameterProperties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(apiParameterGUID, schemaElementGUID); + integrationReportWriter.reportElementCreation(apiParameterGUID); } + + return apiParameterGUID; } @@ -969,14 +1152,34 @@ public String createAPIParameterFromTemplate(String schemaElementGUI UserNotAuthorizedException, PropertyServerException { + String apiParameterGUID; + if (externalSourceIsHome) { - return apiManagerClient.createAPIParameterFromTemplate(userId, externalSourceGUID, externalSourceName, schemaElementGUID, templateGUID, templateProperties); + apiParameterGUID = apiManagerClient.createAPIParameterFromTemplate(userId, + externalSourceGUID, + externalSourceName, + schemaElementGUID, + templateGUID, + templateProperties); } else { - return apiManagerClient.createAPIParameterFromTemplate(userId, null, null, schemaElementGUID, templateGUID, templateProperties); + apiParameterGUID = apiManagerClient.createAPIParameterFromTemplate(userId, + null, + null, + schemaElementGUID, + templateGUID, + templateProperties); } + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(apiParameterGUID, schemaElementGUID); + integrationReportWriter.reportElementCreation(apiParameterGUID); + } + + return apiParameterGUID; } @@ -1005,6 +1208,11 @@ public void setupSchemaType(String relationshipTypeName, { apiManagerClient.setupSchemaType(userId, null, null, relationshipTypeName, apiParameterGUID, schemaTypeGUID); } + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(schemaTypeGUID, apiParameterGUID); + } } @@ -1043,6 +1251,11 @@ public void updateAPIParameter(String apiParameterGUID, PropertyServerException { apiManagerClient.updateAPIParameter(userId, externalSourceGUID, externalSourceName, apiParameterGUID, isMergeUpdate, apiParameterProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(apiParameterGUID); + } } @@ -1060,6 +1273,11 @@ public void removeAPIParameter(String apiParameterGUID) throws InvalidParameterE PropertyServerException { apiManagerClient.removeAPIParameter(userId, externalSourceGUID, externalSourceName, apiParameterGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(apiParameterGUID); + } } @@ -1177,14 +1395,22 @@ public String createPrimitiveSchemaType(PrimitiveSchemaTypeProperties schemaType UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; if (externalSourceIsHome) { - return apiManagerClient.createPrimitiveSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + schemaTypeGUID = apiManagerClient.createPrimitiveSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); } else { - return apiManagerClient.createPrimitiveSchemaType(userId, null, null, schemaTypeProperties); + schemaTypeGUID = apiManagerClient.createPrimitiveSchemaType(userId, null, null, schemaTypeProperties); } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -1203,14 +1429,23 @@ public String createLiteralSchemaType(LiteralSchemaTypeProperties schemaTypeProp UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return apiManagerClient.createLiteralSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + schemaTypeGUID = apiManagerClient.createLiteralSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); } else { - return apiManagerClient.createLiteralSchemaType(userId, null, null, schemaTypeProperties); + schemaTypeGUID = apiManagerClient.createLiteralSchemaType(userId, null, null, schemaTypeProperties); } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -1231,14 +1466,31 @@ public String createEnumSchemaType(EnumSchemaTypeProperties schemaTypeProperties UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return apiManagerClient.createEnumSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, validValuesSetGUID); + schemaTypeGUID = apiManagerClient.createEnumSchemaType(userId, + externalSourceGUID, + externalSourceName, + schemaTypeProperties, + validValuesSetGUID); } else { - return apiManagerClient.createEnumSchemaType(userId, null, null, schemaTypeProperties, validValuesSetGUID); + schemaTypeGUID = apiManagerClient.createEnumSchemaType(userId, + null, + null, + schemaTypeProperties, + validValuesSetGUID); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); } + + return schemaTypeGUID; } @@ -1305,14 +1557,23 @@ public String createStructSchemaType(StructSchemaTypeProperties schemaTypeProper UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return apiManagerClient.createStructSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + schemaTypeGUID = apiManagerClient.createStructSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); } else { - return apiManagerClient.createStructSchemaType(userId, null, null, schemaTypeProperties); + schemaTypeGUID = apiManagerClient.createStructSchemaType(userId, null, null, schemaTypeProperties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); } + + return schemaTypeGUID; } @@ -1333,14 +1594,24 @@ public String createSchemaTypeChoice(SchemaTypeChoiceProperties schemaTypeProper UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return apiManagerClient.createSchemaTypeChoice(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, schemaTypeOptionGUIDs); + schemaTypeGUID = apiManagerClient.createSchemaTypeChoice(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, + schemaTypeOptionGUIDs); } else { - return apiManagerClient.createSchemaTypeChoice(userId, null, null, schemaTypeProperties, schemaTypeOptionGUIDs); + schemaTypeGUID = apiManagerClient.createSchemaTypeChoice(userId, null, null, schemaTypeProperties, schemaTypeOptionGUIDs); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); } + + return schemaTypeGUID; } @@ -1363,14 +1634,33 @@ public String createMapSchemaType(MapSchemaTypeProperties schemaTypeProperties, UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return apiManagerClient.createMapSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, mapFromSchemaTypeGUID, mapToSchemaTypeGUID); + schemaTypeGUID = apiManagerClient.createMapSchemaType(userId, + externalSourceGUID, + externalSourceName, + schemaTypeProperties, + mapFromSchemaTypeGUID, + mapToSchemaTypeGUID); } else { - return apiManagerClient.createMapSchemaType(userId, null, null, schemaTypeProperties, mapFromSchemaTypeGUID, mapToSchemaTypeGUID); + schemaTypeGUID = apiManagerClient.createMapSchemaType(userId, + null, + null, + schemaTypeProperties, + mapFromSchemaTypeGUID, + mapToSchemaTypeGUID); } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -1391,14 +1681,31 @@ public String createSchemaTypeFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return apiManagerClient.createSchemaTypeFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, templateProperties); + schemaTypeGUID = apiManagerClient.createSchemaTypeFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + templateProperties); } else { - return apiManagerClient.createSchemaTypeFromTemplate(userId, null, null, templateGUID, templateProperties); + schemaTypeGUID = apiManagerClient.createSchemaTypeFromTemplate(userId, + null, + null, + templateGUID, + templateProperties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); } + + return schemaTypeGUID; } @@ -1421,6 +1728,11 @@ public void updateSchemaType(String schemaTypeGUID, PropertyServerException { apiManagerClient.updateSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeGUID, isMergeUpdate, schemaTypeProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(schemaTypeGUID); + } } @@ -1438,6 +1750,11 @@ public void removeSchemaType(String schemaTypeGUID) throws InvalidParameterExcep PropertyServerException { apiManagerClient.removeSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(schemaTypeGUID); + } } @@ -1461,7 +1778,19 @@ public void setupSchemaElementRelationship(String endOneGUID, UserNotAuthorizedException, PropertyServerException { - apiManagerClient.setupSchemaElementRelationship(userId, externalSourceGUID, externalSourceName, endOneGUID, endTwoGUID, relationshipTypeName, properties); + apiManagerClient.setupSchemaElementRelationship(userId, + externalSourceGUID, + externalSourceName, + endOneGUID, + endTwoGUID, + relationshipTypeName, + properties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(endTwoGUID, endOneGUID); + integrationReportWriter.reportElementUpdate(endOneGUID); + } } @@ -1595,4 +1924,454 @@ public ElementHeader getSchemaTypeParent(String schemaTypeGUID) throws InvalidPa { return apiManagerClient.getSchemaTypeParent(userId, schemaTypeGUID); } + + /* ===================================================================================================================== + * A ValidValue is the top level object for working with valid values + */ + + /** + * Create a new metadata element to represent a valid value. + * + * @param validValueProperties properties about the valid value to store + * + * @return unique identifier of the new valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public String createValidValue(ValidValueProperties validValueProperties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + String validValueGUID = validValueManagement.createValidValue(userId, externalSourceGUID, externalSourceName, validValueProperties); + + if ((validValueGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(validValueGUID); + } + + return validValueGUID; + } + + + /** + * Update the metadata element representing a valid value. It is possible to use the subtype property classes or + * set up specialized properties in extended properties. + * + * @param validValueGUID unique identifier of the metadata element to update + * @param isMergeUpdate should the new properties be merged with existing properties (true) or completely replace them (false)? + * @param validValueProperties new properties for the metadata element + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void updateValidValue(String validValueGUID, + boolean isMergeUpdate, + ValidValueProperties validValueProperties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.updateValidValue(userId, externalSourceGUID, externalSourceName, validValueGUID, isMergeUpdate, validValueProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(validValueGUID); + } + } + + + /** + * Create a membership relationship between a validValue and a validValueSet that it belongs to. + * + * @param validValueSetGUID unique identifier of the valid value set + * @param properties describes the properties of the membership + * @param validValueMemberGUID unique identifier of the member + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void setupValidValueMember(String validValueSetGUID, + ValidValueMembershipProperties properties, + String validValueMemberGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.setupValidValueMember(userId, externalSourceGUID, externalSourceName, validValueSetGUID, properties, validValueMemberGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(validValueMemberGUID, validValueSetGUID); + integrationReportWriter.reportElementUpdate(validValueSetGUID); + } + } + + + /** + * Remove a membership relationship between a validValue and a validValueSet that it belongs to. + * + * @param validValueSetGUID unique identifier of the valid value set + * @param validValueMemberGUID unique identifier of the member + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void clearValidValueMember(String validValueSetGUID, + String validValueMemberGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.clearValidValueMember(userId, externalSourceGUID, externalSourceName, validValueSetGUID, validValueMemberGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(validValueMemberGUID, validValueSetGUID); + integrationReportWriter.reportElementUpdate(validValueSetGUID); + } + } + + + /** + * Create a valid value assignment relationship between an element and a valid value (typically, a valid value set) to show that + * the valid value defines the values that can be stored in the data item that the element represents. + * + * @param elementGUID unique identifier of the element + * @param properties describes the permissions that the role has in the validValue + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void setupValidValues(String elementGUID, + ValidValueAssignmentProperties properties, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.setupValidValues(userId, externalSourceGUID, externalSourceName, elementGUID, properties, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Remove a valid value assignment relationship between an element and a valid value. + * + * @param elementGUID unique identifier of the element + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void clearValidValues(String elementGUID, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.clearValidValues(userId, externalSourceGUID, externalSourceName, elementGUID, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Create a reference value assignment relationship between an element and a valid value to show that + * the valid value is a semiformal tag/classification. + * + * @param elementGUID unique identifier of the element + * @param properties describes the quality of the assignment + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void setupReferenceValueTag(String elementGUID, + ReferenceValueAssignmentProperties properties, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.setupReferenceValueTag(userId, externalSourceGUID, externalSourceName, elementGUID, properties, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Remove a reference value assignment relationship between an element and a valid value. + * + * @param elementGUID unique identifier of the element + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void clearReferenceValueTag(String elementGUID, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.clearReferenceValueTag(userId, externalSourceGUID, externalSourceName, elementGUID, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Remove the metadata element representing a valid value. + * + * @param validValueGUID unique identifier of the metadata element to remove + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void removeValidValue(String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.removeValidValue(userId, externalSourceGUID, externalSourceName, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(validValueGUID); + } + } + + + /** + * Retrieve the list of metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param searchString string to find in the properties + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return list of matching metadata elements + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public List findValidValues(String searchString, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.findValidValues(userId, searchString, startFrom, pageSize); + } + + + /** + * Retrieve the list of metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param name name to search for + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return list of matching metadata elements + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public List getValidValuesByName(String name, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValuesByName(userId, name, startFrom, pageSize); + } + + + /** + * Retrieve the list of valid values. + * + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return list of matching metadata elements + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public List getAllValidValues(int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getAllValidValues(userId, startFrom, pageSize); + } + + + /** + * Page through the members of a valid value set. + * + * @param validValueSetGUID unique identifier of the valid value set + * @param startFrom paging starting point + * @param pageSize maximum number of return values. + * @return list of valid value beans + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public List getValidValueSetMembers(String validValueSetGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValueSetMembers(userId, validValueSetGUID, startFrom, pageSize); + } + + + /** + * Page through the list of valid value sets that a valid value definition/set belongs to. + * + * @param validValueGUID unique identifier of valid value to query + * @param startFrom paging starting point + * @param pageSize maximum number of return values. + * @return list of valid value beans + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public List getSetsForValidValue(String validValueGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getSetsForValidValue(userId, validValueGUID, startFrom, pageSize); + } + + + /** + * Return information about the valid value set linked to an element as its set of valid values. + * + * @param elementGUID unique identifier for the element using the valid value set + * + * @return list of matching actor profiles (hopefully only one) + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public ValidValueElement getValidValuesForConsumer(String elementGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValuesForConsumer(userId, elementGUID); + } + + + /** + * Return information about the consumers linked to a validValue. + * + * @param validValueGUID unique identifier for the validValue + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. + * + * @return list of matching actor profiles (hopefully only one) + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public List getConsumersOfValidValue(String validValueGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getConsumersOfValidValue(userId, validValueGUID, startFrom, pageSize); + } + + + /** + * Return information about the valid values linked as reference value tags to an element. + * + * @param elementGUID unique identifier for the element + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. + * + * @return list of valid values + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public List getReferenceValues(String elementGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getReferenceValues(userId, elementGUID, startFrom, pageSize); + } + + + /** + * Return information about the person roles linked to a validValue. + * + * @param validValueGUID unique identifier for the validValue + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. + * + * @return list of matching actor profiles (hopefully only one) + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public List getAssigneesOfReferenceValue(String validValueGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getAssigneesOfReferenceValue(userId, validValueGUID, startFrom, pageSize); + } + + + /** + * Retrieve the metadata element with the supplied unique identifier. + * + * @param validValueGUID unique identifier of the requested metadata element + * + * @return requested metadata element + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public ValidValueElement getValidValueByGUID(String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValueByGUID(userId, validValueGUID); + } } diff --git a/open-metadata-implementation/integration-services/api-integrator/api-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/api/contextmanager/APIIntegratorContextManager.java b/open-metadata-implementation/integration-services/api-integrator/api-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/api/contextmanager/APIIntegratorContextManager.java index 9301a2f430d..a77ac479cdf 100644 --- a/open-metadata-implementation/integration-services/api-integrator/api-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/api/contextmanager/APIIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/api-integrator/api-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/api/contextmanager/APIIntegratorContextManager.java @@ -32,6 +32,7 @@ public class APIIntegratorContextManager extends IntegrationContextManager { private APIManagerClient apiManagerClient = null; private ConnectionManagerClient connectionManagerClient = null; + private ValidValueManagement validValueManagement = null; private MetadataSourceClient metadataSourceClient = null; private DataManagerRESTClient restClient = null; /** @@ -102,6 +103,11 @@ public void createClients() throws InvalidParameterException maxPageSize, auditLog); + validValueManagement = new ValidValueManagement(partnerOMASServerName, + partnerOMASPlatformRootURL, + restClient, + maxPageSize); + apiManagerClient= new APIManagerClient(partnerOMASServerName, partnerOMASPlatformRootURL, restClient, @@ -212,11 +218,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - DataManagerEventClient dataManagerEventClient = new DataManagerEventClient(partnerOMASServerName, partnerOMASPlatformRootURL, restClient, @@ -232,11 +233,11 @@ public IntegrationContext setContext(String connectorId, openMetadataStoreClient, apiManagerClient, connectionManagerClient, + validValueManagement, dataManagerEventClient, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName); serviceSpecificConnector.setContext(integratorContext); diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/CatalogIntegratorContext.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/CatalogIntegratorContext.java index cdaa7fe4661..5dd2d81a651 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/CatalogIntegratorContext.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/catalog/connector/CatalogIntegratorContext.java @@ -13,7 +13,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.integrationservices.catalog.ffdc.CatalogIntegratorAuditCode; import org.odpi.openmetadata.integrationservices.catalog.ffdc.CatalogIntegratorErrorCode; @@ -97,7 +96,6 @@ public class CatalogIntegratorContext extends IntegrationContext * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param disabledExchangeServices option from the integration service's configuration * @param integrationServiceName name of this service * @param auditLog logging destination @@ -124,7 +122,6 @@ public CatalogIntegratorContext(String connectorId, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String assetManagerGUID, String assetManagerName, String integrationServiceName, @@ -141,8 +138,7 @@ public CatalogIntegratorContext(String connectorId, permittedSynchronization, assetManagerGUID, assetManagerName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); final String methodName = "CatalogIntegratorContext"; diff --git a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/catalog/contextmanager/CatalogIntegratorContextManager.java b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/catalog/contextmanager/CatalogIntegratorContextManager.java index ec1a043d313..fc55b494687 100644 --- a/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/catalog/contextmanager/CatalogIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/catalog-integrator/catalog-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/catalog/contextmanager/CatalogIntegratorContextManager.java @@ -12,7 +12,6 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnector; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.IntegrationContextManager; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.governanceservers.integrationdaemonservices.registration.IntegrationServiceDescription; @@ -307,11 +306,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - CatalogIntegratorContext integratorContext = new CatalogIntegratorContext(connectorId, connectorName, connectorUserId, @@ -334,7 +328,6 @@ public IntegrationContext setContext(String connectorId, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName, IntegrationServiceDescription.CATALOG_INTEGRATOR_OMIS.getIntegrationServiceFullName(), diff --git a/open-metadata-implementation/integration-services/database-integrator/database-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/database/connector/DatabaseIntegratorContext.java b/open-metadata-implementation/integration-services/database-integrator/database-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/database/connector/DatabaseIntegratorContext.java index fd003ba468b..f7fdc8e9d36 100644 --- a/open-metadata-implementation/integration-services/database-integrator/database-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/database/connector/DatabaseIntegratorContext.java +++ b/open-metadata-implementation/integration-services/database-integrator/database-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/database/connector/DatabaseIntegratorContext.java @@ -7,13 +7,13 @@ import org.odpi.openmetadata.accessservices.datamanager.client.ConnectionManagerClient; import org.odpi.openmetadata.accessservices.datamanager.client.DatabaseManagerClient; import org.odpi.openmetadata.accessservices.datamanager.client.DataManagerEventClient; +import org.odpi.openmetadata.accessservices.datamanager.client.ValidValueManagement; import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; import org.odpi.openmetadata.accessservices.datamanager.properties.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.*; import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import java.util.List; @@ -27,7 +27,8 @@ public class DatabaseIntegratorContext extends IntegrationContext { private final ConnectionManagerClient connectionManagerClient; private final DatabaseManagerClient databaseManagerClient; - private final DataManagerEventClient eventClient; + private final DataManagerEventClient eventClient; + private final ValidValueManagement validValueManagement; @@ -42,12 +43,12 @@ public class DatabaseIntegratorContext extends IntegrationContext * @param openMetadataStoreClient client for calling the metadata server * @param databaseManagerClient client to managing database metadata * @param connectionManagerClient client for managing connections + * @param validValueManagement client for managing valid value sets and definitions * @param eventClient client to register for events * @param generateIntegrationReport should the connector generate an integration reports? * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the database manager * @param externalSourceName unique name of the software server capability for the database manager */ @@ -59,11 +60,11 @@ public DatabaseIntegratorContext(String connectorId, OpenMetadataClient openMetadataStoreClient, DatabaseManagerClient databaseManagerClient, ConnectionManagerClient connectionManagerClient, + ValidValueManagement validValueManagement, DataManagerEventClient eventClient, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName) { @@ -77,29 +78,12 @@ public DatabaseIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); this.databaseManagerClient = databaseManagerClient; this.eventClient = eventClient; this.connectionManagerClient = connectionManagerClient; - } - - - /* ======================================================== - * Returning the database manager name from the configuration - */ - - - /** - * Return the qualified name of the database manager that is supplied in the configuration - * document. - * - * @return string name - */ - public String getExternalSourceName() - { - return externalSourceName; + this.validValueManagement = validValueManagement; } @@ -151,7 +135,15 @@ public String createDatabase(DatabaseProperties databaseProperties) throws Inval UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabase(userId, externalSourceGUID, externalSourceName, databaseProperties); + String databaseGUID = databaseManagerClient.createDatabase(userId, externalSourceGUID, externalSourceName, databaseProperties); + + if ((databaseGUID != null) &&(integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(databaseGUID, databaseGUID); + integrationReportWriter.reportElementCreation(databaseGUID); + } + + return databaseGUID; } @@ -172,7 +164,15 @@ public String createDatabaseFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, templateProperties); + String databaseGUID = databaseManagerClient.createDatabaseFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, templateProperties); + + if ((databaseGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(databaseGUID, databaseGUID); + integrationReportWriter.reportElementCreation(databaseGUID); + } + + return databaseGUID; } @@ -193,6 +193,12 @@ public void updateDatabase(String databaseGUID, PropertyServerException { databaseManagerClient.updateDatabase(userId, externalSourceGUID, externalSourceName, databaseGUID, false, databaseProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseGUID, databaseGUID); + integrationReportWriter.reportElementUpdate(databaseGUID); + } } @@ -214,6 +220,12 @@ public void updateDatabase(String databaseGUID, PropertyServerException { databaseManagerClient.updateDatabase(userId, externalSourceGUID, externalSourceName, databaseGUID, isMergeUpdate, databaseProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseGUID, databaseGUID); + integrationReportWriter.reportElementUpdate(databaseGUID); + } } @@ -233,6 +245,12 @@ public void publishDatabase(String databaseGUID) throws InvalidParameterExceptio PropertyServerException { databaseManagerClient.publishDatabase(userId, databaseGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseGUID, databaseGUID); + integrationReportWriter.reportElementUpdate(databaseGUID); + } } @@ -252,6 +270,12 @@ public void withdrawDatabase(String databaseGUID) throws InvalidParameterExcepti PropertyServerException { databaseManagerClient.withdrawDatabase(userId, databaseGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseGUID, databaseGUID); + integrationReportWriter.reportElementUpdate(databaseGUID); + } } @@ -273,6 +297,12 @@ public void removeDatabase(String databaseGUID, PropertyServerException { databaseManagerClient.removeDatabase(userId, externalSourceGUID, externalSourceName, databaseGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseGUID, databaseGUID); + integrationReportWriter.reportElementDelete(databaseGUID); + } } @@ -290,6 +320,12 @@ public void removeDatabase(String databaseGUID) throws InvalidParameterException PropertyServerException { databaseManagerClient.removeDatabase(userId, externalSourceGUID, externalSourceName, databaseGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseGUID, databaseGUID); + integrationReportWriter.reportElementDelete(databaseGUID); + } } @@ -402,7 +438,20 @@ public String createDatabaseSchema(String databaseGUID, UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseSchema(userId, externalSourceGUID, externalSourceName, databaseGUID, databaseSchemaProperties); + String databaseSchemaGUID = databaseManagerClient.createDatabaseSchema(userId, + externalSourceGUID, + externalSourceName, + databaseGUID, + databaseSchemaProperties); + + if ((databaseSchemaGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(databaseSchemaGUID, databaseSchemaGUID); + integrationReportWriter.reportElementUpdate(databaseGUID); + integrationReportWriter.reportElementCreation(databaseSchemaGUID); + } + + return databaseSchemaGUID; } @@ -425,7 +474,21 @@ public String createDatabaseSchemaFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseSchemaFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, databaseGUID, templateProperties); + String databaseSchemaGUID = databaseManagerClient.createDatabaseSchemaFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + databaseGUID, + templateProperties); + + if ((databaseSchemaGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(databaseSchemaGUID, databaseSchemaGUID); + integrationReportWriter.reportElementUpdate(databaseGUID); + integrationReportWriter.reportElementCreation(databaseSchemaGUID); + } + + return databaseSchemaGUID; } @@ -445,7 +508,18 @@ public void updateDatabaseSchema(String databaseSchemaGUID, UserNotAuthorizedException, PropertyServerException { - databaseManagerClient.updateDatabaseSchema(userId, externalSourceGUID, externalSourceName, databaseSchemaGUID, false, databaseSchemaProperties); + databaseManagerClient.updateDatabaseSchema(userId, + externalSourceGUID, + externalSourceName, + databaseSchemaGUID, + false, + databaseSchemaProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseSchemaGUID, databaseSchemaGUID); + integrationReportWriter.reportElementUpdate(databaseSchemaGUID); + } } @@ -466,7 +540,18 @@ public void updateDatabaseSchema(String databaseSchemaGUID, UserNotAuthorizedException, PropertyServerException { - databaseManagerClient.updateDatabaseSchema(userId, externalSourceGUID, externalSourceName, databaseSchemaGUID, isMergeUpdate, databaseSchemaProperties); + databaseManagerClient.updateDatabaseSchema(userId, + externalSourceGUID, + externalSourceName, + databaseSchemaGUID, + isMergeUpdate, + databaseSchemaProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseSchemaGUID, databaseSchemaGUID); + integrationReportWriter.reportElementUpdate(databaseSchemaGUID); + } } @@ -486,6 +571,12 @@ public void publishDatabaseSchema(String databaseSchemaGUID) throws InvalidParam PropertyServerException { databaseManagerClient.publishDatabaseSchema(userId, databaseSchemaGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseSchemaGUID, databaseSchemaGUID); + integrationReportWriter.reportElementUpdate(databaseSchemaGUID); + } } @@ -505,6 +596,12 @@ public void withdrawDatabaseSchema(String databaseSchemaGUID) throws InvalidPara PropertyServerException { databaseManagerClient.withdrawDatabaseSchema(userId, databaseSchemaGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseSchemaGUID, databaseSchemaGUID); + integrationReportWriter.reportElementUpdate(databaseSchemaGUID); + } } @@ -526,6 +623,12 @@ public void removeDatabaseSchema(String databaseSchemaGUID, PropertyServerException { databaseManagerClient.removeDatabaseSchema(userId, externalSourceGUID, externalSourceName, databaseSchemaGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseSchemaGUID, databaseSchemaGUID); + integrationReportWriter.reportElementDelete(databaseSchemaGUID); + } } @@ -543,6 +646,12 @@ public void removeDatabaseSchema(String databaseSchemaGUID) throws InvalidParame PropertyServerException { databaseManagerClient.removeDatabaseSchema(userId, externalSourceGUID, externalSourceName, databaseSchemaGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseSchemaGUID, databaseSchemaGUID); + integrationReportWriter.reportElementDelete(databaseSchemaGUID); + } } @@ -655,7 +764,17 @@ public String createDatabaseSchemaType(String qualifiedName) throws InvalidParam UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseSchemaType(userId, externalSourceGUID, externalSourceName, qualifiedName); + String databaseSchemaTypeGUID = databaseManagerClient.createDatabaseSchemaType(userId, + externalSourceGUID, + externalSourceName, + qualifiedName); + + if ((databaseSchemaTypeGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(databaseSchemaTypeGUID); + } + + return databaseSchemaTypeGUID; } @@ -675,6 +794,13 @@ public void attachSchemaTypeToDatabaseAsset(String databaseAssetGUID, UserNotAuthorizedException { databaseManagerClient.attachSchemaTypeToDatabaseAsset(userId, externalSourceGUID, externalSourceName, databaseAssetGUID, schemaTypeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseAssetGUID, databaseAssetGUID); + integrationReportWriter.setAnchor(schemaTypeGUID, databaseAssetGUID); + integrationReportWriter.reportElementUpdate(databaseAssetGUID); + } } @@ -695,7 +821,20 @@ public String createDatabaseTable(String databaseAssetGUID, UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseTable(userId, externalSourceGUID, externalSourceName, databaseAssetGUID, databaseTableProperties); + String databaseTableGUID = databaseManagerClient.createDatabaseTable(userId, + externalSourceGUID, + externalSourceName, + databaseAssetGUID, + databaseTableProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(databaseAssetGUID, databaseAssetGUID); + integrationReportWriter.setAnchor(databaseTableGUID, databaseAssetGUID); + integrationReportWriter.reportElementCreation(databaseTableGUID); + } + + return databaseTableGUID; } @@ -718,7 +857,21 @@ public String createDatabaseTableFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseTableFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, databaseAssetGUID, templateProperties); + String databaseTableGUID = databaseManagerClient.createDatabaseTableFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + databaseAssetGUID, + templateProperties); + + if ((databaseTableGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(databaseAssetGUID, databaseAssetGUID); + integrationReportWriter.setAnchor(databaseTableGUID, databaseAssetGUID); + integrationReportWriter.reportElementCreation(databaseTableGUID); + } + + return databaseTableGUID; } @@ -739,7 +892,19 @@ public String createDatabaseTableForSchemaType(String databaseS UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseTableForSchemaType(userId, externalSourceGUID, externalSourceName, databaseSchemaTypeGUID, databaseTableProperties); + String databaseTableGUID = databaseManagerClient.createDatabaseTableForSchemaType(userId, + externalSourceGUID, + externalSourceName, + databaseSchemaTypeGUID, + databaseTableProperties); + + if ((databaseTableGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(databaseTableGUID, databaseSchemaTypeGUID); + integrationReportWriter.reportElementCreation(databaseTableGUID); + } + + return databaseTableGUID; } @@ -759,7 +924,17 @@ public void updateDatabaseTable(String databaseTableGUID, UserNotAuthorizedException, PropertyServerException { - databaseManagerClient.updateDatabaseTable(userId, externalSourceGUID, externalSourceName, databaseTableGUID, false, databaseTableProperties); + databaseManagerClient.updateDatabaseTable(userId, + externalSourceGUID, + externalSourceName, + databaseTableGUID, + false, + databaseTableProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(databaseTableGUID); + } } @@ -780,7 +955,17 @@ public void updateDatabaseTable(String databaseTableGUID, UserNotAuthorizedException, PropertyServerException { - databaseManagerClient.updateDatabaseTable(userId, externalSourceGUID, externalSourceName, databaseTableGUID, isMergeUpdate, databaseTableProperties); + databaseManagerClient.updateDatabaseTable(userId, + externalSourceGUID, + externalSourceName, + databaseTableGUID, + isMergeUpdate, + databaseTableProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(databaseTableGUID); + } } @@ -802,6 +987,11 @@ public void removeDatabaseTable(String databaseTableGUID, PropertyServerException { databaseManagerClient.removeDatabaseTable(userId, externalSourceGUID, externalSourceName, databaseTableGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(databaseTableGUID); + } } @@ -820,6 +1010,11 @@ public void removeDatabaseTable(String databaseTableGUID) throws InvalidParamete PropertyServerException { databaseManagerClient.removeDatabaseTable(userId, externalSourceGUID, externalSourceName, databaseTableGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(databaseTableGUID); + } } @@ -954,7 +1149,19 @@ public String createDatabaseView(String databaseAssetGUID, UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseView(userId, externalSourceGUID, externalSourceName, databaseAssetGUID, databaseViewProperties); + String databaseViewGUID = databaseManagerClient.createDatabaseView(userId, + externalSourceGUID, + externalSourceName, + databaseAssetGUID, + databaseViewProperties); + + if ((databaseViewGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(databaseViewGUID, databaseAssetGUID); + integrationReportWriter.reportElementCreation(databaseViewGUID); + } + + return databaseViewGUID; } @@ -977,7 +1184,20 @@ public String createDatabaseViewFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseViewFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, databaseAssetGUID, templateProperties); + String databaseViewGUID = databaseManagerClient.createDatabaseViewFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + databaseAssetGUID, + templateProperties); + + if ((databaseViewGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(databaseViewGUID, databaseAssetGUID); + integrationReportWriter.reportElementCreation(databaseViewGUID); + } + + return databaseViewGUID; } @@ -998,7 +1218,19 @@ public String createDatabaseViewForSchemaType(String databaseSch UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseViewForSchemaType(userId, externalSourceGUID, externalSourceName, databaseSchemaTypeGUID, databaseViewProperties); + String databaseViewGUID = databaseManagerClient.createDatabaseViewForSchemaType(userId, + externalSourceGUID, + externalSourceName, + databaseSchemaTypeGUID, + databaseViewProperties); + + if ((databaseViewGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(databaseViewGUID, databaseSchemaTypeGUID); + integrationReportWriter.reportElementCreation(databaseViewGUID); + } + + return databaseViewGUID; } @@ -1018,9 +1250,18 @@ public void updateDatabaseView(String databaseViewGUID, UserNotAuthorizedException, PropertyServerException { - databaseManagerClient.updateDatabaseView(userId, externalSourceGUID, externalSourceName, databaseViewGUID, false, databaseViewProperties); - } + databaseManagerClient.updateDatabaseView(userId, + externalSourceGUID, + externalSourceName, + databaseViewGUID, + false, + databaseViewProperties); + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(databaseViewGUID); + } + } /** @@ -1040,7 +1281,17 @@ public void updateDatabaseView(String databaseViewGUID, UserNotAuthorizedException, PropertyServerException { - databaseManagerClient.updateDatabaseView(userId, externalSourceGUID, externalSourceName, databaseViewGUID, isMergeUpdate, databaseViewProperties); + databaseManagerClient.updateDatabaseView(userId, + externalSourceGUID, + externalSourceName, + databaseViewGUID, + isMergeUpdate, + databaseViewProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(databaseViewGUID); + } } @@ -1063,8 +1314,12 @@ public void removeDatabaseView(String databaseViewGUID, PropertyServerException { databaseManagerClient.removeDatabaseView(userId, externalSourceGUID, externalSourceName, databaseViewGUID); - } + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(databaseViewGUID); + } + } /** @@ -1081,6 +1336,11 @@ public void removeDatabaseView(String databaseViewGUID) throws InvalidParameterE PropertyServerException { databaseManagerClient.removeDatabaseView(userId, externalSourceGUID, externalSourceName, databaseViewGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(databaseViewGUID); + } } @@ -1222,7 +1482,19 @@ public String createDatabaseColumn(String databaseTableGUID, UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseColumn(userId, externalSourceGUID, externalSourceName, databaseTableGUID, databaseColumnProperties); + String databaseColumnGUID = databaseManagerClient.createDatabaseColumn(userId, + externalSourceGUID, + externalSourceName, + databaseTableGUID, + databaseColumnProperties); + + if ((databaseColumnGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setParent(databaseColumnGUID, databaseTableGUID); + integrationReportWriter.reportElementCreation(databaseColumnGUID); + } + + return databaseColumnGUID; } @@ -1245,7 +1517,20 @@ public String createDatabaseColumnFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return databaseManagerClient.createDatabaseColumnFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, databaseTableGUID, templateProperties); + String databaseColumnGUID = databaseManagerClient.createDatabaseColumnFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + databaseTableGUID, + templateProperties); + + if ((databaseColumnGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setParent(databaseColumnGUID, databaseTableGUID); + integrationReportWriter.reportElementCreation(databaseColumnGUID); + } + + return databaseColumnGUID; } @@ -1265,7 +1550,17 @@ public void updateDatabaseColumn(String databaseColumnGUID, UserNotAuthorizedException, PropertyServerException { - databaseManagerClient.updateDatabaseColumn(userId, externalSourceGUID, externalSourceName, databaseColumnGUID, false, databaseColumnProperties); + databaseManagerClient.updateDatabaseColumn(userId, + externalSourceGUID, + externalSourceName, + databaseColumnGUID, + false, + databaseColumnProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(databaseColumnGUID); + } } @@ -1286,7 +1581,17 @@ public void updateDatabaseColumn(String databaseColumnGUID, UserNotAuthorizedException, PropertyServerException { - databaseManagerClient.updateDatabaseColumn(userId, externalSourceGUID, externalSourceName, databaseColumnGUID, isMergeUpdate, databaseColumnProperties); + databaseManagerClient.updateDatabaseColumn(userId, + externalSourceGUID, + externalSourceName, + databaseColumnGUID, + isMergeUpdate, + databaseColumnProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(databaseColumnGUID); + } } @@ -1308,6 +1613,11 @@ public void removeDatabaseColumn(String databaseColumnGUID, PropertyServerException { databaseManagerClient.removeDatabaseColumn(userId, externalSourceGUID, externalSourceName, databaseColumnGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(databaseColumnGUID); + } } @@ -1325,6 +1635,11 @@ public void removeDatabaseColumn(String databaseColumnGUID) throws InvalidParame PropertyServerException { databaseManagerClient.removeDatabaseColumn(userId, externalSourceGUID, externalSourceName, databaseColumnGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(databaseColumnGUID); + } } @@ -1439,6 +1754,11 @@ public void setPrimaryKeyOnColumn(String databaseColumnGUI PropertyServerException { databaseManagerClient.setPrimaryKeyOnColumn(userId, externalSourceGUID, externalSourceName, databaseColumnGUID, databasePrimaryKeyProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(databaseColumnGUID); + } } @@ -1456,6 +1776,11 @@ public void removePrimaryKeyFromColumn(String databaseColumnGUID) throws Invalid PropertyServerException { databaseManagerClient.removePrimaryKeyFromColumn(userId, externalSourceGUID, externalSourceName, databaseColumnGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(databaseColumnGUID); + } } @@ -1477,8 +1802,17 @@ public void addForeignKeyRelationship(String primaryKeyCol UserNotAuthorizedException, PropertyServerException { - databaseManagerClient.addForeignKeyRelationship(userId, externalSourceGUID, externalSourceName, primaryKeyColumnGUID, foreignKeyColumnGUID - , databaseForeignKeyProperties); + databaseManagerClient.addForeignKeyRelationship(userId, + externalSourceGUID, + externalSourceName, + primaryKeyColumnGUID, + foreignKeyColumnGUID, + databaseForeignKeyProperties); + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(primaryKeyColumnGUID); + integrationReportWriter.reportElementUpdate(foreignKeyColumnGUID); + } } @@ -1498,6 +1832,12 @@ public void removeForeignKeyRelationship(String primaryKeyColumnGUID, PropertyServerException { databaseManagerClient.removeForeignKeyRelationship(userId, externalSourceGUID, externalSourceName, primaryKeyColumnGUID, foreignKeyColumnGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(primaryKeyColumnGUID); + integrationReportWriter.reportElementUpdate(foreignKeyColumnGUID); + } } @@ -1521,7 +1861,14 @@ public String createConnection(ConnectionProperties connectionProperties) throws UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createConnection(userId, null, null, connectionProperties); + String connectionGUID = connectionManagerClient.createConnection(userId, null, null, connectionProperties); + + if ((connectionGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(connectionGUID); + } + + return connectionGUID; } @@ -1542,7 +1889,18 @@ public String createConnectionFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createConnectionFromTemplate(userId, null, null, templateGUID, templateProperties); + String connectionGUID = connectionManagerClient.createConnectionFromTemplate(userId, + null, + null, + templateGUID, + templateProperties); + + if ((connectionGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(connectionGUID); + } + + return connectionGUID; } @@ -1565,6 +1923,11 @@ public void updateConnection(String connectionGUID, PropertyServerException { connectionManagerClient.updateConnection(userId, externalSourceGUID, externalSourceName, connectionGUID, isMergeUpdate, connectionProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } @@ -1584,6 +1947,11 @@ public void setupConnectorType(String connectionGUID, PropertyServerException { connectionManagerClient.setupConnectorType(userId, null, null, connectionGUID, connectorTypeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } @@ -1603,6 +1971,11 @@ public void clearConnectorType(String connectionGUID, PropertyServerException { connectionManagerClient.clearConnectorType(userId, externalSourceGUID, externalSourceName, connectionGUID, connectorTypeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } @@ -1622,6 +1995,11 @@ public void setupEndpoint(String connectionGUID, PropertyServerException { connectionManagerClient.setupEndpoint(userId, null, null, connectionGUID, endpointGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } @@ -1641,6 +2019,11 @@ public void clearEndpoint(String connectionGUID, PropertyServerException { connectionManagerClient.clearEndpoint(userId, externalSourceGUID, externalSourceName, connectionGUID, endpointGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } @@ -1666,6 +2049,12 @@ public void setupEmbeddedConnection(String connectionGUID, PropertyServerException { connectionManagerClient.setupEmbeddedConnection(userId, null, null, connectionGUID, position, displayName, arguments, embeddedConnectionGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(embeddedConnectionGUID, connectionGUID); + integrationReportWriter.reportElementUpdate(embeddedConnectionGUID); + } } @@ -1685,6 +2074,12 @@ public void clearEmbeddedConnection(String connectionGUID, PropertyServerException { connectionManagerClient.clearEmbeddedConnection(userId, externalSourceGUID, externalSourceName, connectionGUID, embeddedConnectionGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(embeddedConnectionGUID, connectionGUID); + integrationReportWriter.reportElementUpdate(embeddedConnectionGUID); + } } @@ -1706,6 +2101,12 @@ public void setupAssetConnection(String assetGUID, PropertyServerException { connectionManagerClient.setupAssetConnection(userId, null, null, assetGUID, assetSummary, connectionGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(connectionGUID, assetGUID); + integrationReportWriter.reportElementUpdate(connectionGUID); + } } @@ -1725,6 +2126,12 @@ public void clearAssetConnection(String assetGUID, PropertyServerException { connectionManagerClient.clearAssetConnection(userId, externalSourceGUID, externalSourceName, assetGUID, connectionGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(connectionGUID, assetGUID); + integrationReportWriter.reportElementUpdate(connectionGUID); + } } @@ -1827,7 +2234,14 @@ public String createEndpoint(EndpointProperties endpointProperties) throws Inval UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createEndpoint(userId, null, null, endpointProperties); + String endpointGUID = connectionManagerClient.createEndpoint(userId, null, null, endpointProperties); + + if ((endpointGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(endpointGUID); + } + + return endpointGUID; } @@ -1850,8 +2264,19 @@ public String createEndpointFromTemplate(String networkAddress, UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createEndpointFromTemplate(userId, externalSourceGUID, externalSourceName, networkAddress, templateGUID, - templateProperties); + String endpointGUID = connectionManagerClient.createEndpointFromTemplate(userId, + externalSourceGUID, + externalSourceName, + networkAddress, + templateGUID, + templateProperties); + + if ((endpointGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(endpointGUID); + } + + return endpointGUID; } @@ -1874,9 +2299,12 @@ public void updateEndpoint(boolean isMergeUpdate, PropertyServerException { connectionManagerClient.updateEndpoint(userId, externalSourceGUID, externalSourceName, isMergeUpdate, endpointGUID, endpointProperties); - } - + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(endpointGUID); + } + } /** @@ -1893,6 +2321,11 @@ public void removeEndpoint(String endpointGUID) throws InvalidParameterException PropertyServerException { connectionManagerClient.removeEndpoint(userId, externalSourceGUID, externalSourceName, endpointGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(endpointGUID); + } } @@ -2028,4 +2461,455 @@ public ConnectorTypeElement getConnectorTypeByGUID(String connectorTypeGUID) thr { return connectionManagerClient.getConnectorTypeByGUID(userId, connectorTypeGUID); } + + + /* ===================================================================================================================== + * A ValidValue is the top level object for working with valid values + */ + + /** + * Create a new metadata element to represent a valid value. + * + * @param validValueProperties properties about the valid value to store + * + * @return unique identifier of the new valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public String createValidValue(ValidValueProperties validValueProperties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + String validValueGUID = validValueManagement.createValidValue(userId, externalSourceGUID, externalSourceName, validValueProperties); + + if ((validValueGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(validValueGUID); + } + + return validValueGUID; + } + + + /** + * Update the metadata element representing a valid value. It is possible to use the subtype property classes or + * set up specialized properties in extended properties. + * + * @param validValueGUID unique identifier of the metadata element to update + * @param isMergeUpdate should the new properties be merged with existing properties (true) or completely replace them (false)? + * @param validValueProperties new properties for the metadata element + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void updateValidValue(String validValueGUID, + boolean isMergeUpdate, + ValidValueProperties validValueProperties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.updateValidValue(userId, externalSourceGUID, externalSourceName, validValueGUID, isMergeUpdate, validValueProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(validValueGUID); + } + } + + + /** + * Create a membership relationship between a validValue and a validValueSet that it belongs to. + * + * @param validValueSetGUID unique identifier of the valid value set + * @param properties describes the properties of the membership + * @param validValueMemberGUID unique identifier of the member + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void setupValidValueMember(String validValueSetGUID, + ValidValueMembershipProperties properties, + String validValueMemberGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.setupValidValueMember(userId, externalSourceGUID, externalSourceName, validValueSetGUID, properties, validValueMemberGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(validValueMemberGUID, validValueSetGUID); + integrationReportWriter.reportElementUpdate(validValueSetGUID); + } + } + + + /** + * Remove a membership relationship between a validValue and a validValueSet that it belongs to. + * + * @param validValueSetGUID unique identifier of the valid value set + * @param validValueMemberGUID unique identifier of the member + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void clearValidValueMember(String validValueSetGUID, + String validValueMemberGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.clearValidValueMember(userId, externalSourceGUID, externalSourceName, validValueSetGUID, validValueMemberGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(validValueMemberGUID, validValueSetGUID); + integrationReportWriter.reportElementUpdate(validValueSetGUID); + } + } + + + /** + * Create a valid value assignment relationship between an element and a valid value (typically, a valid value set) to show that + * the valid value defines the values that can be stored in the data item that the element represents. + * + * @param elementGUID unique identifier of the element + * @param properties describes the permissions that the role has in the validValue + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void setupValidValues(String elementGUID, + ValidValueAssignmentProperties properties, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.setupValidValues(userId, externalSourceGUID, externalSourceName, elementGUID, properties, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Remove a valid value assignment relationship between an element and a valid value. + * + * @param elementGUID unique identifier of the element + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void clearValidValues(String elementGUID, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.clearValidValues(userId, externalSourceGUID, externalSourceName, elementGUID, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Create a reference value assignment relationship between an element and a valid value to show that + * the valid value is a semiformal tag/classification. + * + * @param elementGUID unique identifier of the element + * @param properties describes the quality of the assignment + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void setupReferenceValueTag(String elementGUID, + ReferenceValueAssignmentProperties properties, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.setupReferenceValueTag(userId, externalSourceGUID, externalSourceName, elementGUID, properties, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Remove a reference value assignment relationship between an element and a valid value. + * + * @param elementGUID unique identifier of the element + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void clearReferenceValueTag(String elementGUID, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.clearReferenceValueTag(userId, externalSourceGUID, externalSourceName, elementGUID, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Remove the metadata element representing a valid value. + * + * @param validValueGUID unique identifier of the metadata element to remove + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void removeValidValue(String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.removeValidValue(userId, externalSourceGUID, externalSourceName, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(validValueGUID); + } + } + + + /** + * Retrieve the list of metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param searchString string to find in the properties + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return list of matching metadata elements + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public List findValidValues(String searchString, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.findValidValues(userId, searchString, startFrom, pageSize); + } + + + /** + * Retrieve the list of metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param name name to search for + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return list of matching metadata elements + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public List getValidValuesByName(String name, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValuesByName(userId, name, startFrom, pageSize); + } + + + /** + * Retrieve the list of valid values. + * + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return list of matching metadata elements + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public List getAllValidValues(int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getAllValidValues(userId, startFrom, pageSize); + } + + + /** + * Page through the members of a valid value set. + * + * @param validValueSetGUID unique identifier of the valid value set + * @param startFrom paging starting point + * @param pageSize maximum number of return values. + * @return list of valid value beans + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public List getValidValueSetMembers(String validValueSetGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValueSetMembers(userId, validValueSetGUID, startFrom, pageSize); + } + + + /** + * Page through the list of valid value sets that a valid value definition/set belongs to. + * + * @param validValueGUID unique identifier of valid value to query + * @param startFrom paging starting point + * @param pageSize maximum number of return values. + * @return list of valid value beans + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public List getSetsForValidValue(String validValueGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getSetsForValidValue(userId, validValueGUID, startFrom, pageSize); + } + + + /** + * Return information about the valid value set linked to an element as its set of valid values. + * + * @param elementGUID unique identifier for the element using the valid value set + * + * @return list of matching actor profiles (hopefully only one) + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public ValidValueElement getValidValuesForConsumer(String elementGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValuesForConsumer(userId, elementGUID); + } + + + /** + * Return information about the consumers linked to a validValue. + * + * @param validValueGUID unique identifier for the validValue + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. + * + * @return list of matching actor profiles (hopefully only one) + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public List getConsumersOfValidValue(String validValueGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getConsumersOfValidValue(userId, validValueGUID, startFrom, pageSize); + } + + + /** + * Return information about the valid values linked as reference value tags to an element. + * + * @param elementGUID unique identifier for the element + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. + * + * @return list of valid values + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public List getReferenceValues(String elementGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getReferenceValues(userId, elementGUID, startFrom, pageSize); + } + + + /** + * Return information about the person roles linked to a validValue. + * + * @param validValueGUID unique identifier for the validValue + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. + * + * @return list of matching actor profiles (hopefully only one) + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public List getAssigneesOfReferenceValue(String validValueGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getAssigneesOfReferenceValue(userId, validValueGUID, startFrom, pageSize); + } + + + /** + * Retrieve the metadata element with the supplied unique identifier. + * + * @param validValueGUID unique identifier of the requested metadata element + * + * @return requested metadata element + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public ValidValueElement getValidValueByGUID(String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValueByGUID(userId, validValueGUID); + } } diff --git a/open-metadata-implementation/integration-services/database-integrator/database-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/database/contextmanager/DatabaseIntegratorContextManager.java b/open-metadata-implementation/integration-services/database-integrator/database-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/database/contextmanager/DatabaseIntegratorContextManager.java index 8a6113f4fdb..30766b86c49 100644 --- a/open-metadata-implementation/integration-services/database-integrator/database-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/database/contextmanager/DatabaseIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/database-integrator/database-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/database/contextmanager/DatabaseIntegratorContextManager.java @@ -7,7 +7,6 @@ import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; import org.odpi.openmetadata.accessservices.datamanager.properties.DatabaseManagerProperties; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -32,6 +31,7 @@ public class DatabaseIntegratorContextManager extends IntegrationContextManager { private DatabaseManagerClient databaseManagerClient = null; private ConnectionManagerClient connectionManagerClient = null; + private ValidValueManagement validValueManagement = null; private MetadataSourceClient metadataSourceClient = null; private DataManagerRESTClient restClient = null; @@ -108,6 +108,11 @@ public void createClients() throws InvalidParameterException maxPageSize, auditLog); + validValueManagement = new ValidValueManagement(partnerOMASServerName, + partnerOMASPlatformRootURL, + restClient, + maxPageSize); + metadataSourceClient = new MetadataSourceClient(partnerOMASServerName, partnerOMASPlatformRootURL, restClient, @@ -214,11 +219,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - DataManagerEventClient dataManagerEventClient = new DataManagerEventClient(partnerOMASServerName, partnerOMASPlatformRootURL, restClient, @@ -234,11 +234,11 @@ public IntegrationContext setContext(String connectorId, openMetadataStoreClient, databaseManagerClient, connectionManagerClient, + validValueManagement, dataManagerEventClient, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName); serviceSpecificConnector.setContext(integratorContext); diff --git a/open-metadata-implementation/integration-services/display-integrator/display-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/display/connector/DisplayIntegratorContext.java b/open-metadata-implementation/integration-services/display-integrator/display-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/display/connector/DisplayIntegratorContext.java index 437749cf76f..cf920617833 100644 --- a/open-metadata-implementation/integration-services/display-integrator/display-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/display/connector/DisplayIntegratorContext.java +++ b/open-metadata-implementation/integration-services/display-integrator/display-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/display/connector/DisplayIntegratorContext.java @@ -13,7 +13,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import java.util.List; @@ -43,7 +42,6 @@ public class DisplayIntegratorContext extends IntegrationContext * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the asset manager * @param externalSourceName unique name of the software server capability for the asset manager */ @@ -58,7 +56,6 @@ public DisplayIntegratorContext(String connectorId, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName) { @@ -72,8 +69,7 @@ public DisplayIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); this.client = displayApplicationClient; this.eventClient = eventClient; @@ -126,7 +122,15 @@ public String createForm(FormProperties formProperties) throws InvalidParameterE UserNotAuthorizedException, PropertyServerException { - return client.createForm(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, formProperties); + String formGUID = client.createForm(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, formProperties); + + if ((formGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(formGUID, formGUID); + integrationReportWriter.reportElementCreation(formGUID); + } + + return formGUID; } @@ -147,7 +151,20 @@ public String createFormFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return client.createFormFromTemplate(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, templateGUID, templateProperties); + String formGUID = client.createFormFromTemplate(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + templateGUID, + templateProperties); + + if ((formGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(formGUID, formGUID); + integrationReportWriter.reportElementCreation(formGUID); + } + + return formGUID; } @@ -169,6 +186,12 @@ public void updateForm(String formGUID, PropertyServerException { client.updateForm(userId, externalSourceGUID, externalSourceName, formGUID, isMergeUpdate, formProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(formGUID, formGUID); + integrationReportWriter.reportElementUpdate(formGUID); + } } @@ -188,6 +211,12 @@ public void publishForm(String formGUID) throws InvalidParameterException, PropertyServerException { client.publishForm(userId, formGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(formGUID, formGUID); + integrationReportWriter.reportElementUpdate(formGUID); + } } @@ -207,6 +236,12 @@ public void withdrawForm(String formGUID) throws InvalidParameterException, PropertyServerException { client.withdrawForm(userId, formGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(formGUID, formGUID); + integrationReportWriter.reportElementUpdate(formGUID); + } } @@ -226,6 +261,12 @@ public void removeForm(String formGUID, PropertyServerException { client.removeForm(userId, externalSourceGUID, externalSourceName, formGUID, qualifiedName); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(formGUID, formGUID); + integrationReportWriter.reportElementDelete(formGUID); + } } @@ -332,7 +373,19 @@ public String createReport(ReportProperties reportProperties) throws InvalidPara UserNotAuthorizedException, PropertyServerException { - return client.createReport(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, reportProperties); + String reportGUID = client.createReport(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + reportProperties); + + if ((reportGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(reportGUID, reportGUID); + integrationReportWriter.reportElementCreation(reportGUID); + } + + return reportGUID; } @@ -353,7 +406,20 @@ public String createReportFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return client.createReportFromTemplate(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, templateGUID, templateProperties); + String reportGUID = client.createReportFromTemplate(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + templateGUID, + templateProperties); + + if ((reportGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(reportGUID, reportGUID); + integrationReportWriter.reportElementCreation(reportGUID); + } + + return reportGUID; } @@ -375,6 +441,12 @@ public void updateReport(String reportGUID, PropertyServerException { client.updateReport(userId, externalSourceGUID, externalSourceName, reportGUID, isMergeUpdate, reportProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(reportGUID, reportGUID); + integrationReportWriter.reportElementUpdate(reportGUID); + } } @@ -394,6 +466,12 @@ public void publishReport(String reportGUID) throws InvalidParameterException, PropertyServerException { client.publishReport(userId, reportGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(reportGUID, reportGUID); + integrationReportWriter.reportElementUpdate(reportGUID); + } } @@ -413,6 +491,12 @@ public void withdrawReport(String reportGUID) throws InvalidParameterException, PropertyServerException { client.withdrawReport(userId, reportGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(reportGUID, reportGUID); + integrationReportWriter.reportElementUpdate(reportGUID); + } } @@ -438,6 +522,12 @@ public void removeReport(String userId, PropertyServerException { client.removeReport(userId, applicationGUID, applicationName, reportGUID, qualifiedName); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(reportGUID, reportGUID); + integrationReportWriter.reportElementDelete(reportGUID); + } } @@ -544,7 +634,19 @@ public String createQuery(QueryProperties queryProperties) throws InvalidParamet UserNotAuthorizedException, PropertyServerException { - return client.createQuery(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, queryProperties); + String queryGUID = client.createQuery(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + queryProperties); + + if ((queryGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(queryGUID, queryGUID); + integrationReportWriter.reportElementCreation(queryGUID); + } + + return queryGUID; } @@ -565,7 +667,20 @@ public String createQueryFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return client.createQueryFromTemplate(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, templateGUID, templateProperties); + String queryGUID = client.createQueryFromTemplate(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + templateGUID, + templateProperties); + + if ((queryGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(queryGUID, queryGUID); + integrationReportWriter.reportElementCreation(queryGUID); + } + + return queryGUID; } @@ -587,6 +702,12 @@ public void updateQuery(String queryGUID, PropertyServerException { client.updateQuery(userId, externalSourceGUID, externalSourceName, queryGUID, isMergeUpdate, queryProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(queryGUID, queryGUID); + integrationReportWriter.reportElementUpdate(queryGUID); + } } @@ -606,6 +727,12 @@ public void publishQuery(String queryGUID) throws InvalidParameterException, PropertyServerException { client.publishQuery(userId, queryGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(queryGUID, queryGUID); + integrationReportWriter.reportElementUpdate(queryGUID); + } } @@ -625,6 +752,12 @@ public void withdrawQuery(String queryGUID) throws InvalidParameterException, PropertyServerException { client.withdrawQuery(userId, queryGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(queryGUID, queryGUID); + integrationReportWriter.reportElementUpdate(queryGUID); + } } @@ -650,6 +783,12 @@ public void removeQuery(String userId, PropertyServerException { client.removeQuery(userId, applicationGUID, applicationName, queryGUID, qualifiedName); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(queryGUID, queryGUID); + integrationReportWriter.reportElementDelete(queryGUID); + } } @@ -764,7 +903,20 @@ public String createDataContainer(String parentElementGUID, UserNotAuthorizedException, PropertyServerException { - return client.createDataContainer(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, parentElementGUID, dataContainerProperties); + String dataContainerGUID = client.createDataContainer(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + parentElementGUID, + dataContainerProperties); + + if ((dataContainerGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setParent(dataContainerGUID, parentElementGUID); + integrationReportWriter.reportElementCreation(dataContainerGUID); + } + + return dataContainerGUID; } @@ -787,7 +939,21 @@ public String createDataContainerFromTemplate(String parentElementGU UserNotAuthorizedException, PropertyServerException { - return client.createDataContainerFromTemplate(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, parentElementGUID, templateGUID, templateProperties); + String dataContainerGUID = client.createDataContainerFromTemplate(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + parentElementGUID, + templateGUID, + templateProperties); + + if ((dataContainerGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setParent(dataContainerGUID, parentElementGUID); + integrationReportWriter.reportElementCreation(dataContainerGUID); + } + + return dataContainerGUID; } @@ -810,6 +976,11 @@ public void updateDataContainer(String dataContainerGUID, PropertyServerException { client.updateDataContainer(userId, externalSourceGUID, externalSourceName, dataContainerGUID, isMergeUpdate, dataContainerProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(dataContainerGUID); + } } @@ -829,6 +1000,11 @@ public void removeDataContainer(String dataContainerGUID) throws InvalidParamete PropertyServerException { client.removeDataContainer(userId, externalSourceGUID, externalSourceName, dataContainerGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(dataContainerGUID); + } } @@ -964,7 +1140,20 @@ public String createDataField(String parentElementGUID, UserNotAuthorizedException, PropertyServerException { - return client.createDataField(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, parentElementGUID, properties); + String dataFieldGUID = client.createDataField(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + parentElementGUID, + properties); + + if ((dataFieldGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setParent(dataFieldGUID, parentElementGUID); + integrationReportWriter.reportElementCreation(dataFieldGUID); + } + + return dataFieldGUID; } @@ -972,7 +1161,7 @@ public String createDataField(String parentElementGUID, * Create a new metadata element to represent a data field using an existing metadata element as a template. * * @param templateGUID unique identifier of the metadata element to copy - * @param reportGUID unique identifier of the report where the data field is located + * @param parentElementGUID unique identifier of the report where the data field is located * @param templateProperties properties that override the template * * @return unique identifier of the new data field @@ -982,12 +1171,26 @@ public String createDataField(String parentElementGUID, * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ public String createDataFieldFromTemplate(String templateGUID, - String reportGUID, + String parentElementGUID, TemplateProperties templateProperties) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - return client.createDataFieldFromTemplate(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, templateGUID, reportGUID, templateProperties); + String dataFieldGUID = client.createDataFieldFromTemplate(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + templateGUID, + parentElementGUID, + templateProperties); + + if ((dataFieldGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setParent(dataFieldGUID, parentElementGUID); + integrationReportWriter.reportElementCreation(dataFieldGUID); + } + + return dataFieldGUID; } @@ -995,7 +1198,7 @@ public String createDataFieldFromTemplate(String templateGUID, * Connect a schema type to a data field. * * @param relationshipTypeName name of relationship to create - * @param apiParameterGUID unique identifier of the API parameter + * @param dataFieldGUID unique identifier of the data field * @param schemaTypeGUID unique identifier of the schema type to connect * * @throws InvalidParameterException one of the parameters is invalid @@ -1003,12 +1206,24 @@ public String createDataFieldFromTemplate(String templateGUID, * @throws PropertyServerException there is a problem reported in the open metadata server(s) */ public void setupSchemaType(String relationshipTypeName, - String apiParameterGUID, + String dataFieldGUID, String schemaTypeGUID) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException { - client.setupSchemaType(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, relationshipTypeName, apiParameterGUID, schemaTypeGUID); + client.setupSchemaType(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + relationshipTypeName, + dataFieldGUID, + schemaTypeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(schemaTypeGUID, dataFieldGUID); + integrationReportWriter.reportElementUpdate(dataFieldGUID); + } } @@ -1030,6 +1245,11 @@ public void updateDataField(String dataFieldGUID, PropertyServerException { client.updateDataField(userId, externalSourceGUID, externalSourceName, dataFieldGUID, isMergeUpdate, properties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(dataFieldGUID); + } } @@ -1053,6 +1273,11 @@ public void removeDataField(String userId, PropertyServerException { client.removeDataField(userId, applicationGUID, applicationName, dataFieldGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(dataFieldGUID); + } } diff --git a/open-metadata-implementation/integration-services/display-integrator/display-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/display/contextmanager/DisplayIntegratorContextManager.java b/open-metadata-implementation/integration-services/display-integrator/display-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/display/contextmanager/DisplayIntegratorContextManager.java index 86ea63c8a4c..c1bb11769d4 100644 --- a/open-metadata-implementation/integration-services/display-integrator/display-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/display/contextmanager/DisplayIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/display-integrator/display-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/display/contextmanager/DisplayIntegratorContextManager.java @@ -7,7 +7,6 @@ import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; import org.odpi.openmetadata.accessservices.datamanager.properties.ApplicationProperties; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -207,12 +206,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - - DataManagerEventClient dataManagerEventClient = new DataManagerEventClient(partnerOMASServerName, partnerOMASPlatformRootURL, restClient, @@ -231,7 +224,6 @@ public IntegrationContext setContext(String connectorId, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName); serviceSpecificConnector.setContext(integratorContext); diff --git a/open-metadata-implementation/integration-services/files-integrator/files-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/files/connector/FilesIntegratorContext.java b/open-metadata-implementation/integration-services/files-integrator/files-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/files/connector/FilesIntegratorContext.java index 536476b5194..ccb238a12c0 100644 --- a/open-metadata-implementation/integration-services/files-integrator/files-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/files/connector/FilesIntegratorContext.java +++ b/open-metadata-implementation/integration-services/files-integrator/files-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/files/connector/FilesIntegratorContext.java @@ -7,6 +7,7 @@ import org.odpi.openmetadata.accessservices.datamanager.client.ConnectionManagerClient; import org.odpi.openmetadata.accessservices.datamanager.client.DataManagerEventClient; import org.odpi.openmetadata.accessservices.datamanager.client.FilesAndFoldersClient; +import org.odpi.openmetadata.accessservices.datamanager.client.ValidValueManagement; import org.odpi.openmetadata.accessservices.datamanager.metadataelements.*; import org.odpi.openmetadata.accessservices.datamanager.properties.*; import org.odpi.openmetadata.frameworks.connectors.ffdc.*; @@ -14,7 +15,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import java.util.List; @@ -29,7 +29,8 @@ public class FilesIntegratorContext extends IntegrationContext { private final ConnectionManagerClient connectionManagerClient; private final FilesAndFoldersClient filesAndFoldersClient; - private final DataManagerEventClient eventClient; + private final DataManagerEventClient eventClient; + private final ValidValueManagement validValueManagement; /** @@ -43,12 +44,12 @@ public class FilesIntegratorContext extends IntegrationContext * @param openMetadataStoreClient client for calling the metadata server * @param filesAndFoldersClient client to map request to * @param connectionManagerClient client for managing connections + * @param validValueManagement client for managing valid value sets and definitions * @param eventClient client to register for events * @param generateIntegrationReport should the connector generate an integration reports? * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the asset manager * @param externalSourceName unique name of the software server capability for the asset manager */ @@ -60,11 +61,11 @@ public FilesIntegratorContext(String connectorId, OpenMetadataClient openMetadataStoreClient, FilesAndFoldersClient filesAndFoldersClient, ConnectionManagerClient connectionManagerClient, + ValidValueManagement validValueManagement, DataManagerEventClient eventClient, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName) { @@ -78,11 +79,11 @@ public FilesIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); this.filesAndFoldersClient = filesAndFoldersClient; this.connectionManagerClient = connectionManagerClient; + this.validValueManagement = validValueManagement; this.eventClient = eventClient; } @@ -138,7 +139,28 @@ public List createNestedFolders(String parentGUID, UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.createNestedFolders(userId, externalSourceGUID, externalSourceName, parentGUID, pathName); + List nestedFolderGUIDs = filesAndFoldersClient.createNestedFolders(userId, + externalSourceGUID, + externalSourceName, + parentGUID, + pathName); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(parentGUID, parentGUID); + integrationReportWriter.reportElementUpdate(parentGUID); + + if ((nestedFolderGUIDs != null) && (nestedFolderGUIDs.size() > 0)) + { + for (String folderGUID : nestedFolderGUIDs) + { + integrationReportWriter.setAnchor(folderGUID, folderGUID); + integrationReportWriter.reportElementCreation(folderGUID); + } + } + } + + return nestedFolderGUIDs; } @@ -158,6 +180,14 @@ public void attachTopLevelFolder(String fileSystemGUID, PropertyServerException { filesAndFoldersClient.attachTopLevelFolder(userId, externalSourceGUID, externalSourceName, fileSystemGUID, folderGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(folderGUID, folderGUID); + integrationReportWriter.setAnchor(fileSystemGUID, fileSystemGUID); + integrationReportWriter.reportElementUpdate(fileSystemGUID); + integrationReportWriter.reportElementUpdate(folderGUID); + } } @@ -177,6 +207,14 @@ public void detachTopLevelFolder(String fileSystemGUID, PropertyServerException { filesAndFoldersClient.detachTopLevelFolder(userId, externalSourceGUID, externalSourceName, fileSystemGUID, folderGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(folderGUID, folderGUID); + integrationReportWriter.setAnchor(fileSystemGUID, fileSystemGUID); + integrationReportWriter.reportElementUpdate(fileSystemGUID); + integrationReportWriter.reportElementUpdate(folderGUID); + } } @@ -201,7 +239,22 @@ public List addDataFileToCatalog(DataFileProperties dataFileProperties, UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.addDataFileToCatalog(userId, externalSourceGUID, externalSourceName, dataFileProperties, connectorProviderName); + List nestedFolderGUIDs = filesAndFoldersClient.addDataFileToCatalog(userId, + externalSourceGUID, + externalSourceName, + dataFileProperties, + connectorProviderName); + + if ((nestedFolderGUIDs != null) && (nestedFolderGUIDs.size() > 0) && (integrationReportWriter != null)) + { + for (String folderGUID : nestedFolderGUIDs) + { + integrationReportWriter.setAnchor(folderGUID, folderGUID); + integrationReportWriter.reportElementCreation(folderGUID); + } + } + + return nestedFolderGUIDs; } @@ -226,7 +279,22 @@ public List addDataFileToCatalogFromTemplate(String template UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.addDataFileToCatalogFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, templateProperties); + List nestedFolderGUIDs = filesAndFoldersClient.addDataFileToCatalogFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + templateProperties); + + if ((nestedFolderGUIDs != null) && (nestedFolderGUIDs.size() > 0) && (integrationReportWriter != null)) + { + for (String folderGUID : nestedFolderGUIDs) + { + integrationReportWriter.setAnchor(folderGUID, folderGUID); + integrationReportWriter.reportElementCreation(folderGUID); + } + } + + return nestedFolderGUIDs; } @@ -247,7 +315,18 @@ public void updateDataFileInCatalog(String dataFileGUID, UserNotAuthorizedException, PropertyServerException { - filesAndFoldersClient.updateDataFileInCatalog(userId, externalSourceGUID, externalSourceName, dataFileGUID, isMergeUpdate, dataFileProperties); + filesAndFoldersClient.updateDataFileInCatalog(userId, + externalSourceGUID, + externalSourceName, + dataFileGUID, + isMergeUpdate, + dataFileProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(dataFileGUID, dataFileGUID); + integrationReportWriter.reportElementUpdate(dataFileGUID); + } } @@ -266,7 +345,17 @@ public void archiveDataFileInCatalog(String dataFileGUID, UserNotAuthorizedException, PropertyServerException { - filesAndFoldersClient.archiveDataFileInCatalog(userId, externalSourceGUID, externalSourceName, dataFileGUID, archiveProperties); + filesAndFoldersClient.archiveDataFileInCatalog(userId, + externalSourceGUID, + externalSourceName, + dataFileGUID, + archiveProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(dataFileGUID, dataFileGUID); + integrationReportWriter.reportElementDelete(dataFileGUID); + } } @@ -286,6 +375,12 @@ public void deleteDataFileFromCatalog(String dataFileGUID, PropertyServerException { filesAndFoldersClient.deleteDataFileFromCatalog(userId, externalSourceGUID, externalSourceName, dataFileGUID, fullPathname); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(dataFileGUID, dataFileGUID); + integrationReportWriter.reportElementDelete(dataFileGUID); + } } @@ -312,7 +407,22 @@ public List addDataFolderToCatalog(FileFolderProperties fileFolderProper UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.addDataFolderToCatalog(userId, externalSourceGUID, externalSourceName, fileFolderProperties, connectorProviderName); + List nestedFolderGUIDs = filesAndFoldersClient.addDataFolderToCatalog(userId, + externalSourceGUID, + externalSourceName, + fileFolderProperties, + connectorProviderName); + + if ((nestedFolderGUIDs != null) && (nestedFolderGUIDs.size() > 0) && (integrationReportWriter != null)) + { + for (String folderGUID : nestedFolderGUIDs) + { + integrationReportWriter.setAnchor(folderGUID, folderGUID); + integrationReportWriter.reportElementCreation(folderGUID); + } + } + + return nestedFolderGUIDs; } @@ -337,7 +447,22 @@ public List addDataFolderToCatalogFromTemplate(String templa UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.addDataFolderToCatalogFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, templateProperties); + List nestedFolderGUIDs = filesAndFoldersClient.addDataFolderToCatalogFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + templateProperties); + + if ((nestedFolderGUIDs != null) && (nestedFolderGUIDs.size() > 0) && (integrationReportWriter != null)) + { + for (String folderGUID : nestedFolderGUIDs) + { + integrationReportWriter.setAnchor(folderGUID, folderGUID); + integrationReportWriter.reportElementCreation(folderGUID); + } + } + + return nestedFolderGUIDs; } @@ -358,7 +483,18 @@ public void updateDataFolderInCatalog(String dataFolderGUID, UserNotAuthorizedException, PropertyServerException { - filesAndFoldersClient.updateDataFolderInCatalog(userId, externalSourceGUID, externalSourceName, dataFolderGUID, isMergeUpdate, fileFolderProperties); + filesAndFoldersClient.updateDataFolderInCatalog(userId, + externalSourceGUID, + externalSourceName, + dataFolderGUID, + isMergeUpdate, + fileFolderProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(dataFolderGUID, dataFolderGUID); + integrationReportWriter.reportElementUpdate(dataFolderGUID); + } } @@ -378,6 +514,12 @@ public void archiveDataFolderInCatalog(String dataFolderGUID, PropertyServerException { filesAndFoldersClient.archiveDataFolderInCatalog(userId, externalSourceGUID, externalSourceName, dataFolderGUID, archiveProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(dataFolderGUID, dataFolderGUID); + integrationReportWriter.reportElementDelete(dataFolderGUID); + } } @@ -398,6 +540,14 @@ public void attachDataFileAssetToFolder(String folderGUID, PropertyServerException { filesAndFoldersClient.attachDataFileAssetToFolder(userId, externalSourceGUID, externalSourceName, folderGUID, fileGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(folderGUID, folderGUID); + integrationReportWriter.reportElementUpdate(folderGUID); + integrationReportWriter.setAnchor(fileGUID, fileGUID); + integrationReportWriter.reportElementUpdate(fileGUID); + } } @@ -419,6 +569,14 @@ public void detachDataFileAssetFromFolder(String folderGUID, PropertyServerException { filesAndFoldersClient.detachDataFileAssetFromFolder(userId, externalSourceGUID, externalSourceName, folderGUID, fileGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(folderGUID, folderGUID); + integrationReportWriter.reportElementUpdate(folderGUID); + integrationReportWriter.setAnchor(fileGUID, fileGUID); + integrationReportWriter.reportElementUpdate(fileGUID); + } } @@ -609,7 +767,22 @@ public String createPrimitiveSchemaType(PrimitiveSchemaTypeProperties schemaType UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.createPrimitiveSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + String schemaTypeGUID; + if (externalSourceIsHome) + { + schemaTypeGUID = filesAndFoldersClient.createPrimitiveSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + } + else + { + schemaTypeGUID = filesAndFoldersClient.createPrimitiveSchemaType(userId, null, null, schemaTypeProperties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -628,7 +801,23 @@ public String createLiteralSchemaType(LiteralSchemaTypeProperties schemaTypeProp UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.createLiteralSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + String schemaTypeGUID; + + if (externalSourceIsHome) + { + schemaTypeGUID = filesAndFoldersClient.createLiteralSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + } + else + { + schemaTypeGUID = filesAndFoldersClient.createLiteralSchemaType(userId, null, null, schemaTypeProperties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -649,7 +838,31 @@ public String createEnumSchemaType(EnumSchemaTypeProperties schemaTypeProperties UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.createEnumSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, validValuesSetGUID); + String schemaTypeGUID; + + if (externalSourceIsHome) + { + schemaTypeGUID = filesAndFoldersClient.createEnumSchemaType(userId, + externalSourceGUID, + externalSourceName, + schemaTypeProperties, + validValuesSetGUID); + } + else + { + schemaTypeGUID = filesAndFoldersClient.createEnumSchemaType(userId, + null, + null, + schemaTypeProperties, + validValuesSetGUID); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -716,17 +929,33 @@ public String createStructSchemaType(StructSchemaTypeProperties schemaTypeProper UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.createStructSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + String schemaTypeGUID; + + if (externalSourceIsHome) + { + schemaTypeGUID = filesAndFoldersClient.createStructSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + } + else + { + schemaTypeGUID = filesAndFoldersClient.createStructSchemaType(userId, null, null, schemaTypeProperties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } /** - * Create a new metadata element to represent a list of possible schema types that can be used for the attached schema attribute. + * Create a new metadata element to represent a list of possible schema types that can be used for the attached API parameter. * * @param schemaTypeProperties properties about the schema type to store * * @return unique identifier of the new schema type - * @param schemaTypeOptionGUIDs list of unique identifiers of schema types that represent the options to link to + * @param schemaTypeOptionGUIDs list of unique identifiers for schema types to link to * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -737,7 +966,24 @@ public String createSchemaTypeChoice(SchemaTypeChoiceProperties schemaTypeProper UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.createSchemaTypeChoice(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, schemaTypeOptionGUIDs); + String schemaTypeGUID; + + if (externalSourceIsHome) + { + schemaTypeGUID = filesAndFoldersClient.createSchemaTypeChoice(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, + schemaTypeOptionGUIDs); + } + else + { + schemaTypeGUID = filesAndFoldersClient.createSchemaTypeChoice(userId, null, null, schemaTypeProperties, schemaTypeOptionGUIDs); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -760,7 +1006,33 @@ public String createMapSchemaType(MapSchemaTypeProperties schemaTypeProperties, UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.createMapSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, mapFromSchemaTypeGUID, mapToSchemaTypeGUID); + String schemaTypeGUID; + + if (externalSourceIsHome) + { + schemaTypeGUID = filesAndFoldersClient.createMapSchemaType(userId, + externalSourceGUID, + externalSourceName, + schemaTypeProperties, + mapFromSchemaTypeGUID, + mapToSchemaTypeGUID); + } + else + { + schemaTypeGUID = filesAndFoldersClient.createMapSchemaType(userId, + null, + null, + schemaTypeProperties, + mapFromSchemaTypeGUID, + mapToSchemaTypeGUID); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -781,7 +1053,31 @@ public String createSchemaTypeFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.createSchemaTypeFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, templateProperties); + String schemaTypeGUID; + + if (externalSourceIsHome) + { + schemaTypeGUID = filesAndFoldersClient.createSchemaTypeFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + templateProperties); + } + else + { + schemaTypeGUID = filesAndFoldersClient.createSchemaTypeFromTemplate(userId, + null, + null, + templateGUID, + templateProperties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -804,6 +1100,11 @@ public void updateSchemaType(String schemaTypeGUID, PropertyServerException { filesAndFoldersClient.updateSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeGUID, isMergeUpdate, schemaTypeProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(schemaTypeGUID); + } } @@ -821,8 +1122,12 @@ public void removeSchemaType(String schemaTypeGUID) throws InvalidParameterExcep PropertyServerException { filesAndFoldersClient.removeSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeGUID); - } + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(schemaTypeGUID); + } + } /** @@ -845,7 +1150,19 @@ public void setupSchemaElementRelationship(String endOneGUID, UserNotAuthorizedException, PropertyServerException { - filesAndFoldersClient.setupSchemaElementRelationship(userId, externalSourceGUID, externalSourceName, endOneGUID, endTwoGUID, relationshipTypeName, properties); + filesAndFoldersClient.setupSchemaElementRelationship(userId, + externalSourceGUID, + externalSourceName, + endOneGUID, + endTwoGUID, + relationshipTypeName, + properties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(endTwoGUID, endOneGUID); + integrationReportWriter.reportElementUpdate(endOneGUID); + } } @@ -1002,7 +1319,31 @@ public String createSchemaAttribute(String schemaElementGUID, UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.createSchemaAttribute(userId, externalSourceGUID, externalSourceName, schemaElementGUID, schemaAttributeProperties); + String schemaAttributeGUID; + + if (externalSourceIsHome) + { + schemaAttributeGUID = filesAndFoldersClient.createSchemaAttribute(userId, + externalSourceGUID, + externalSourceName, + schemaElementGUID, + schemaAttributeProperties); + } + else + { + schemaAttributeGUID = filesAndFoldersClient.createSchemaAttribute(userId, + null, + null, + schemaElementGUID, + schemaAttributeProperties); + } + + if ((schemaAttributeGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(schemaElementGUID); + } + + return schemaAttributeGUID; } @@ -1025,8 +1366,33 @@ public String createSchemaAttributeFromTemplate(String schemaElement UserNotAuthorizedException, PropertyServerException { - return filesAndFoldersClient.createSchemaAttributeFromTemplate(userId, externalSourceGUID, externalSourceName, schemaElementGUID, - templateGUID, templateProperties); + String schemaAttributeGUID; + + if (externalSourceIsHome) + { + schemaAttributeGUID = filesAndFoldersClient.createSchemaAttributeFromTemplate(userId, + externalSourceGUID, + externalSourceName, + schemaElementGUID, + templateGUID, + templateProperties); + } + else + { + schemaAttributeGUID = filesAndFoldersClient.createSchemaAttributeFromTemplate(userId, + null, + null, + schemaElementGUID, + templateGUID, + templateProperties); + } + + if ((schemaAttributeGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(schemaElementGUID); + } + + return schemaAttributeGUID; } @@ -1047,7 +1413,19 @@ public void setupSchemaType(String relationshipTypeName, UserNotAuthorizedException, PropertyServerException { - filesAndFoldersClient.setupSchemaType(userId, externalSourceGUID, externalSourceName, relationshipTypeName, schemaAttributeGUID, schemaTypeGUID); + if (externalSourceIsHome) + { + filesAndFoldersClient.setupSchemaType(userId, externalSourceGUID, externalSourceName, relationshipTypeName, schemaAttributeGUID, schemaTypeGUID); + } + else + { + filesAndFoldersClient.setupSchemaType(userId, null, null, relationshipTypeName, schemaAttributeGUID, schemaTypeGUID); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(schemaTypeGUID, schemaAttributeGUID); + } } @@ -1065,6 +1443,11 @@ public void clearSchemaTypes(String schemaAttributeGUID) throws InvalidParameter PropertyServerException { filesAndFoldersClient.clearSchemaTypes(userId, externalSourceGUID, externalSourceName, schemaAttributeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(schemaAttributeGUID); + } } @@ -1085,7 +1468,17 @@ public void updateSchemaAttribute(String schemaAttributeGUID, UserNotAuthorizedException, PropertyServerException { - filesAndFoldersClient.updateSchemaAttribute(userId, externalSourceGUID, externalSourceName, schemaAttributeGUID, isMergeUpdate, schemaAttributeProperties); + filesAndFoldersClient.updateSchemaAttribute(userId, + externalSourceGUID, + externalSourceName, + schemaAttributeGUID, + isMergeUpdate, + schemaAttributeProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(schemaAttributeGUID); + } } @@ -1103,6 +1496,11 @@ public void removeSchemaAttribute(String schemaAttributeGUID) throws InvalidPara PropertyServerException { filesAndFoldersClient.removeSchemaAttribute(userId, externalSourceGUID, externalSourceName, schemaAttributeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(schemaAttributeGUID); + } } @@ -1221,7 +1619,14 @@ public String createConnection(ConnectionProperties connectionProperties) throws UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createConnection(userId, externalSourceGUID, externalSourceName, connectionProperties); + String connectionGUID = connectionManagerClient.createConnection(userId, null, null, connectionProperties); + + if ((connectionGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(connectionGUID); + } + + return connectionGUID; } @@ -1242,7 +1647,18 @@ public String createConnectionFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createConnectionFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, templateProperties); + String connectionGUID = connectionManagerClient.createConnectionFromTemplate(userId, + null, + null, + templateGUID, + templateProperties); + + if ((connectionGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(connectionGUID); + } + + return connectionGUID; } @@ -1265,14 +1681,19 @@ public void updateConnection(String connectionGUID, PropertyServerException { connectionManagerClient.updateConnection(userId, externalSourceGUID, externalSourceName, connectionGUID, isMergeUpdate, connectionProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } /** * Create a relationship between a connection and a connector type. * - * @param connectionGUID unique identifier of the connection - * @param connectorTypeGUID unique identifier of the connector type + * @param connectionGUID unique identifier of the connection in the external data manager + * @param connectorTypeGUID unique identifier of the connector type in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1283,15 +1704,20 @@ public void setupConnectorType(String connectionGUID, UserNotAuthorizedException, PropertyServerException { - connectionManagerClient.setupConnectorType(userId, externalSourceGUID, externalSourceName, connectionGUID, connectorTypeGUID); + connectionManagerClient.setupConnectorType(userId, null, null, connectionGUID, connectorTypeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } /** * Remove a relationship between a connection and a connector type. * - * @param connectionGUID unique identifier of the connection - * @param connectorTypeGUID unique identifier of the connector type + * @param connectionGUID unique identifier of the connection in the external data manager + * @param connectorTypeGUID unique identifier of the connector type in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1303,14 +1729,19 @@ public void clearConnectorType(String connectionGUID, PropertyServerException { connectionManagerClient.clearConnectorType(userId, externalSourceGUID, externalSourceName, connectionGUID, connectorTypeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } /** * Create a relationship between a connection and an endpoint. * - * @param connectionGUID unique identifier of the connection - * @param endpointGUID unique identifier of the endpoint + * @param connectionGUID unique identifier of the connection in the external data manager + * @param endpointGUID unique identifier of the endpoint in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1321,15 +1752,20 @@ public void setupEndpoint(String connectionGUID, UserNotAuthorizedException, PropertyServerException { - connectionManagerClient.setupEndpoint(userId, externalSourceGUID, externalSourceName, connectionGUID, endpointGUID); + connectionManagerClient.setupEndpoint(userId, null, null, connectionGUID, endpointGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } /** * Remove a relationship between a connection and an endpoint. * - * @param connectionGUID unique identifier of the connection - * @param endpointGUID unique identifier of the endpoint + * @param connectionGUID unique identifier of the connection in the external data manager + * @param endpointGUID unique identifier of the endpoint in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1341,17 +1777,22 @@ public void clearEndpoint(String connectionGUID, PropertyServerException { connectionManagerClient.clearEndpoint(userId, externalSourceGUID, externalSourceName, connectionGUID, endpointGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } /** * Create a relationship between a virtual connection and an embedded connection. * - * @param connectionGUID unique identifier of the virtual connection + * @param connectionGUID unique identifier of the virtual connection in the external data manager * @param position which order should this connection be processed * @param arguments What additional properties should be passed to the embedded connector via the configuration properties * @param displayName what does this connector signify? - * @param embeddedConnectionGUID unique identifier of the embedded connection + * @param embeddedConnectionGUID unique identifier of the embedded connection in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1365,15 +1806,21 @@ public void setupEmbeddedConnection(String connectionGUID, UserNotAuthorizedException, PropertyServerException { - connectionManagerClient.setupEmbeddedConnection(userId, externalSourceGUID, externalSourceName, connectionGUID, position, displayName, arguments, embeddedConnectionGUID); + connectionManagerClient.setupEmbeddedConnection(userId, null, null, connectionGUID, position, displayName, arguments, embeddedConnectionGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(embeddedConnectionGUID, connectionGUID); + integrationReportWriter.reportElementUpdate(embeddedConnectionGUID); + } } /** * Remove a relationship between a virtual connection and an embedded connection. * - * @param connectionGUID unique identifier of the virtual connection - * @param embeddedConnectionGUID unique identifier of the embedded connection + * @param connectionGUID unique identifier of the virtual connection in the external data manager + * @param embeddedConnectionGUID unique identifier of the embedded connection in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1385,6 +1832,12 @@ public void clearEmbeddedConnection(String connectionGUID, PropertyServerException { connectionManagerClient.clearEmbeddedConnection(userId, externalSourceGUID, externalSourceName, connectionGUID, embeddedConnectionGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(embeddedConnectionGUID, connectionGUID); + integrationReportWriter.reportElementUpdate(embeddedConnectionGUID); + } } @@ -1405,7 +1858,13 @@ public void setupAssetConnection(String assetGUID, UserNotAuthorizedException, PropertyServerException { - connectionManagerClient.setupAssetConnection(userId, externalSourceGUID, externalSourceName, assetGUID, assetSummary, connectionGUID); + connectionManagerClient.setupAssetConnection(userId, null, null, assetGUID, assetSummary, connectionGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(connectionGUID, assetGUID); + integrationReportWriter.reportElementUpdate(connectionGUID); + } } @@ -1425,8 +1884,13 @@ public void clearAssetConnection(String assetGUID, PropertyServerException { connectionManagerClient.clearAssetConnection(userId, externalSourceGUID, externalSourceName, assetGUID, connectionGUID); - } + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(connectionGUID, assetGUID); + integrationReportWriter.reportElementUpdate(connectionGUID); + } + } /** @@ -1474,7 +1938,7 @@ public List findConnections(String searchString, * Retrieve the list of metadata elements with a matching qualified or display name. * There are no wildcards supported on this request. * - * @param name name of the connection to retrieve + * @param name name used to retrieve the connection * @param startFrom paging start point * @param pageSize maximum results that can be returned * @@ -1528,7 +1992,14 @@ public String createEndpoint(EndpointProperties endpointProperties) throws Inval UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createEndpoint(userId, externalSourceGUID, externalSourceName, endpointProperties); + String endpointGUID = connectionManagerClient.createEndpoint(userId, null, null, endpointProperties); + + if ((endpointGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(endpointGUID); + } + + return endpointGUID; } @@ -1551,7 +2022,19 @@ public String createEndpointFromTemplate(String networkAddress, UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createEndpointFromTemplate(userId, externalSourceGUID, externalSourceName, networkAddress, templateGUID, templateProperties); + String endpointGUID = connectionManagerClient.createEndpointFromTemplate(userId, + externalSourceGUID, + externalSourceName, + networkAddress, + templateGUID, + templateProperties); + + if ((endpointGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(endpointGUID); + } + + return endpointGUID; } @@ -1574,9 +2057,12 @@ public void updateEndpoint(boolean isMergeUpdate, PropertyServerException { connectionManagerClient.updateEndpoint(userId, externalSourceGUID, externalSourceName, isMergeUpdate, endpointGUID, endpointProperties); - } - + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(endpointGUID); + } + } /** @@ -1593,6 +2079,11 @@ public void removeEndpoint(String endpointGUID) throws InvalidParameterException PropertyServerException { connectionManagerClient.removeEndpoint(userId, externalSourceGUID, externalSourceName, endpointGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(endpointGUID); + } } @@ -1728,4 +2219,455 @@ public ConnectorTypeElement getConnectorTypeByGUID(String connectorTypeGUID) thr { return connectionManagerClient.getConnectorTypeByGUID(userId, connectorTypeGUID); } + + + /* ===================================================================================================================== + * A ValidValue is the top level object for working with valid values + */ + + /** + * Create a new metadata element to represent a valid value. + * + * @param validValueProperties properties about the valid value to store + * + * @return unique identifier of the new valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public String createValidValue(ValidValueProperties validValueProperties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + String validValueGUID = validValueManagement.createValidValue(userId, externalSourceGUID, externalSourceName, validValueProperties); + + if ((validValueGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(validValueGUID); + } + + return validValueGUID; + } + + + /** + * Update the metadata element representing a valid value. It is possible to use the subtype property classes or + * set up specialized properties in extended properties. + * + * @param validValueGUID unique identifier of the metadata element to update + * @param isMergeUpdate should the new properties be merged with existing properties (true) or completely replace them (false)? + * @param validValueProperties new properties for the metadata element + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void updateValidValue(String validValueGUID, + boolean isMergeUpdate, + ValidValueProperties validValueProperties) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.updateValidValue(userId, externalSourceGUID, externalSourceName, validValueGUID, isMergeUpdate, validValueProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(validValueGUID); + } + } + + + /** + * Create a membership relationship between a validValue and a validValueSet that it belongs to. + * + * @param validValueSetGUID unique identifier of the valid value set + * @param properties describes the properties of the membership + * @param validValueMemberGUID unique identifier of the member + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void setupValidValueMember(String validValueSetGUID, + ValidValueMembershipProperties properties, + String validValueMemberGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.setupValidValueMember(userId, externalSourceGUID, externalSourceName, validValueSetGUID, properties, validValueMemberGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(validValueMemberGUID, validValueSetGUID); + integrationReportWriter.reportElementUpdate(validValueSetGUID); + } + } + + + /** + * Remove a membership relationship between a validValue and a validValueSet that it belongs to. + * + * @param validValueSetGUID unique identifier of the valid value set + * @param validValueMemberGUID unique identifier of the member + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void clearValidValueMember(String validValueSetGUID, + String validValueMemberGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.clearValidValueMember(userId, externalSourceGUID, externalSourceName, validValueSetGUID, validValueMemberGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(validValueMemberGUID, validValueSetGUID); + integrationReportWriter.reportElementUpdate(validValueSetGUID); + } + } + + + /** + * Create a valid value assignment relationship between an element and a valid value (typically, a valid value set) to show that + * the valid value defines the values that can be stored in the data item that the element represents. + * + * @param elementGUID unique identifier of the element + * @param properties describes the permissions that the role has in the validValue + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void setupValidValues(String elementGUID, + ValidValueAssignmentProperties properties, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.setupValidValues(userId, externalSourceGUID, externalSourceName, elementGUID, properties, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Remove a valid value assignment relationship between an element and a valid value. + * + * @param elementGUID unique identifier of the element + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void clearValidValues(String elementGUID, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.clearValidValues(userId, externalSourceGUID, externalSourceName, elementGUID, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Create a reference value assignment relationship between an element and a valid value to show that + * the valid value is a semiformal tag/classification. + * + * @param elementGUID unique identifier of the element + * @param properties describes the quality of the assignment + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void setupReferenceValueTag(String elementGUID, + ReferenceValueAssignmentProperties properties, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.setupReferenceValueTag(userId, externalSourceGUID, externalSourceName, elementGUID, properties, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Remove a reference value assignment relationship between an element and a valid value. + * + * @param elementGUID unique identifier of the element + * @param validValueGUID unique identifier of the valid value + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void clearReferenceValueTag(String elementGUID, + String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.clearReferenceValueTag(userId, externalSourceGUID, externalSourceName, elementGUID, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } + } + + + /** + * Remove the metadata element representing a valid value. + * + * @param validValueGUID unique identifier of the metadata element to remove + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public void removeValidValue(String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + validValueManagement.removeValidValue(userId, externalSourceGUID, externalSourceName, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(validValueGUID); + } + } + + + /** + * Retrieve the list of metadata elements that contain the search string. + * The search string is treated as a regular expression. + * + * @param searchString string to find in the properties + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return list of matching metadata elements + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public List findValidValues(String searchString, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.findValidValues(userId, searchString, startFrom, pageSize); + } + + + /** + * Retrieve the list of metadata elements with a matching qualified or display name. + * There are no wildcards supported on this request. + * + * @param name name to search for + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return list of matching metadata elements + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public List getValidValuesByName(String name, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValuesByName(userId, name, startFrom, pageSize); + } + + + /** + * Retrieve the list of valid values. + * + * @param startFrom paging start point + * @param pageSize maximum results that can be returned + * + * @return list of matching metadata elements + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public List getAllValidValues(int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getAllValidValues(userId, startFrom, pageSize); + } + + + /** + * Page through the members of a valid value set. + * + * @param validValueSetGUID unique identifier of the valid value set + * @param startFrom paging starting point + * @param pageSize maximum number of return values. + * @return list of valid value beans + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public List getValidValueSetMembers(String validValueSetGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValueSetMembers(userId, validValueSetGUID, startFrom, pageSize); + } + + + /** + * Page through the list of valid value sets that a valid value definition/set belongs to. + * + * @param validValueGUID unique identifier of valid value to query + * @param startFrom paging starting point + * @param pageSize maximum number of return values. + * @return list of valid value beans + * @throws InvalidParameterException one of the parameters is invalid. + * @throws UserNotAuthorizedException the user is not authorized to make this request. + * @throws PropertyServerException the repository is not available or not working properly. + */ + public List getSetsForValidValue(String validValueGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getSetsForValidValue(userId, validValueGUID, startFrom, pageSize); + } + + + /** + * Return information about the valid value set linked to an element as its set of valid values. + * + * @param elementGUID unique identifier for the element using the valid value set + * + * @return list of matching actor profiles (hopefully only one) + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public ValidValueElement getValidValuesForConsumer(String elementGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValuesForConsumer(userId, elementGUID); + } + + + /** + * Return information about the consumers linked to a validValue. + * + * @param validValueGUID unique identifier for the validValue + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. + * + * @return list of matching actor profiles (hopefully only one) + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public List getConsumersOfValidValue(String validValueGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getConsumersOfValidValue(userId, validValueGUID, startFrom, pageSize); + } + + + /** + * Return information about the valid values linked as reference value tags to an element. + * + * @param elementGUID unique identifier for the element + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. + * + * @return list of valid values + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public List getReferenceValues(String elementGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getReferenceValues(userId, elementGUID, startFrom, pageSize); + } + + + /** + * Return information about the person roles linked to a validValue. + * + * @param validValueGUID unique identifier for the validValue + * @param startFrom index of the list to start from (0 for start) + * @param pageSize maximum number of elements to return. + * + * @return list of matching actor profiles (hopefully only one) + * + * @throws InvalidParameterException guid is null + * @throws PropertyServerException problem accessing property server + * @throws UserNotAuthorizedException security access problem + */ + public List getAssigneesOfReferenceValue(String validValueGUID, + int startFrom, + int pageSize) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getAssigneesOfReferenceValue(userId, validValueGUID, startFrom, pageSize); + } + + + /** + * Retrieve the metadata element with the supplied unique identifier. + * + * @param validValueGUID unique identifier of the requested metadata element + * + * @return requested metadata element + * + * @throws InvalidParameterException one of the parameters is invalid + * @throws UserNotAuthorizedException the user is not authorized to issue this request + * @throws PropertyServerException there is a problem reported in the open metadata server(s) + */ + public ValidValueElement getValidValueByGUID(String validValueGUID) throws InvalidParameterException, + UserNotAuthorizedException, + PropertyServerException + { + return validValueManagement.getValidValueByGUID(userId, validValueGUID); + } } diff --git a/open-metadata-implementation/integration-services/files-integrator/files-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/files/contextmanager/FilesIntegratorContextManager.java b/open-metadata-implementation/integration-services/files-integrator/files-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/files/contextmanager/FilesIntegratorContextManager.java index 306d65eba59..a495f29ea66 100644 --- a/open-metadata-implementation/integration-services/files-integrator/files-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/files/contextmanager/FilesIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/files-integrator/files-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/files/contextmanager/FilesIntegratorContextManager.java @@ -6,7 +6,6 @@ import org.odpi.openmetadata.accessservices.datamanager.client.*; import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -30,6 +29,7 @@ public class FilesIntegratorContextManager extends IntegrationContextManager { private FilesAndFoldersClient filesAndFoldersClient = null; private ConnectionManagerClient connectionManagerClient = null; + private ValidValueManagement validValueManagement = null; private MetadataSourceClient metadataSourceClient = null; private DataManagerRESTClient restClient = null; @@ -106,6 +106,11 @@ public void createClients() throws InvalidParameterException maxPageSize, auditLog); + validValueManagement = new ValidValueManagement(partnerOMASServerName, + partnerOMASPlatformRootURL, + restClient, + maxPageSize); + metadataSourceClient = new MetadataSourceClient(partnerOMASServerName, partnerOMASPlatformRootURL, restClient, @@ -176,13 +181,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - - - DataManagerEventClient dataManagerEventClient = new DataManagerEventClient(partnerOMASServerName, partnerOMASPlatformRootURL, restClient, @@ -198,11 +196,11 @@ public IntegrationContext setContext(String connectorId, openMetadataStoreClient, filesAndFoldersClient, connectionManagerClient, + validValueManagement, dataManagerEventClient, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName); serviceSpecificConnector.setContext(integratorContext); diff --git a/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/connector/InfrastructureIntegratorContext.java b/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/connector/InfrastructureIntegratorContext.java index 1735418fb09..007d3533d34 100644 --- a/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/connector/InfrastructureIntegratorContext.java +++ b/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/connector/InfrastructureIntegratorContext.java @@ -42,7 +42,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import java.util.Date; @@ -96,7 +95,6 @@ public class InfrastructureIntegratorContext extends IntegrationContext * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the asset manager * @param externalSourceName unique name of the software server capability for the asset manager */ @@ -120,7 +118,6 @@ public InfrastructureIntegratorContext(String connectorId, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName) { @@ -134,8 +131,7 @@ public InfrastructureIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); this.capabilityManagerClient = capabilityManagerClient; this.connectionManagerClient = connectionManagerClient; diff --git a/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/contextmanager/InfrastructureIntegratorContextManager.java b/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/contextmanager/InfrastructureIntegratorContextManager.java index 966f1ffa8d0..5f5482bcbb4 100644 --- a/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/contextmanager/InfrastructureIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/infrastructure-integrator/infrastructure-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/infrastructure/contextmanager/InfrastructureIntegratorContextManager.java @@ -11,7 +11,6 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnector; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.IntegrationContextManager; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.governanceservers.integrationdaemonservices.registration.IntegrationServiceDescription; @@ -179,11 +178,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - ITInfrastructureEventClient eventClient = new ITInfrastructureEventClient(partnerOMASServerName, partnerOMASPlatformRootURL, restClient, @@ -211,7 +205,6 @@ public IntegrationContext setContext(String connectorId, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName); serviceSpecificConnector.setContext(integratorContext); diff --git a/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java b/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java index 71643865de3..beb8fbfa493 100644 --- a/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java +++ b/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/lineage/connector/LineageIntegratorContext.java @@ -21,7 +21,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.integrationservices.lineage.properties.OpenLineageRunEvent; @@ -66,7 +65,6 @@ public class LineageIntegratorContext extends IntegrationContext implements Open * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the asset manager * @param externalSourceName unique name of the software server capability for the asset manager * @param integrationServiceName name of this service @@ -87,7 +85,6 @@ public LineageIntegratorContext(String connectorId, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName, String integrationServiceName, @@ -103,8 +100,7 @@ public LineageIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); this.openLineageListenerManager = openLineageListenerManager; this.dataAssetExchangeClient = dataAssetExchangeClient; diff --git a/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/lineage/contextmanager/LineageIntegratorContextManager.java b/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/lineage/contextmanager/LineageIntegratorContextManager.java index f715382f2f5..a0d33dd8106 100644 --- a/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/lineage/contextmanager/LineageIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/lineage-integrator/lineage-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/lineage/contextmanager/LineageIntegratorContextManager.java @@ -14,7 +14,6 @@ import org.odpi.openmetadata.frameworks.connectors.ffdc.UserNotAuthorizedException; import org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnector; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.IntegrationContextManager; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.governanceservers.integrationdaemonservices.registration.IntegrationServiceDescription; @@ -204,12 +203,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - - AssetManagerEventClient eventClient = new AssetManagerEventClient(partnerOMASServerName, partnerOMASPlatformRootURL, localServerUserId, @@ -235,7 +228,6 @@ public IntegrationContext setContext(String connectorId, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName, IntegrationServiceDescription.LINEAGE_INTEGRATOR_OMIS.getIntegrationServiceFullName(), diff --git a/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/organization/connector/OrganizationIntegratorContext.java b/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/organization/connector/OrganizationIntegratorContext.java index 33eb1743c65..067d72ad7d1 100644 --- a/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/organization/connector/OrganizationIntegratorContext.java +++ b/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/organization/connector/OrganizationIntegratorContext.java @@ -31,7 +31,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import java.util.Date; @@ -69,7 +68,6 @@ public class OrganizationIntegratorContext extends IntegrationContext * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the asset manager * @param externalSourceName unique name of the software server capability for the asset manager * @param auditLog logging destination @@ -87,7 +85,6 @@ public OrganizationIntegratorContext(String connectorId, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName, AuditLog auditLog) @@ -102,8 +99,7 @@ public OrganizationIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); this.organizationClient = organizationManagement; this.securityGroupClient = securityGroupManagement; diff --git a/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/organization/contextmanager/OrganizationIntegratorContextManager.java b/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/organization/contextmanager/OrganizationIntegratorContextManager.java index de24b4e6136..a27cb516347 100644 --- a/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/organization/contextmanager/OrganizationIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/organization-integrator/organization-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/organization/contextmanager/OrganizationIntegratorContextManager.java @@ -6,7 +6,6 @@ import org.odpi.openmetadata.accessservices.communityprofile.client.*; import org.odpi.openmetadata.accessservices.communityprofile.client.rest.CommunityProfileRESTClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -184,12 +183,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - - CommunityProfileEventClient eventClient = new CommunityProfileEventClient(partnerOMASServerName, partnerOMASPlatformRootURL, localServerUserId, @@ -209,7 +202,6 @@ public IntegrationContext setContext(String connectorId, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName, auditLog); diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorContext.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorContext.java index a473e200a82..95e09e76646 100644 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorContext.java +++ b/open-metadata-implementation/integration-services/search-integrator/search-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/search/connector/SearchIntegratorContext.java @@ -8,7 +8,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; /** @@ -36,7 +35,6 @@ public class SearchIntegratorContext extends IntegrationContext * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the asset manager * @param externalSourceName unique name of the software server capability for the asset manager * @param integrationServiceName name of this service @@ -52,7 +50,6 @@ public SearchIntegratorContext(String connectorId, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName, String integrationServiceName, @@ -68,8 +65,7 @@ public SearchIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); this.integrationServiceName = integrationServiceName; this.auditLog = auditLog; diff --git a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java index bca299fe3ce..a32d04afca5 100644 --- a/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/search-integrator/search-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/search/contextmanager/SearchIntegratorContextManager.java @@ -7,7 +7,6 @@ import org.odpi.openmetadata.accessservices.assetcatalog.OpenIntegrationServiceClient; import org.odpi.openmetadata.accessservices.assetcatalog.OpenMetadataStoreClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.accessservices.assetcatalog.eventclient.AssetCatalogEventClient; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; @@ -166,8 +165,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, connectorUserId, externalSourceGUID, externalSourceName); - eventListener.setSearchIntegratorConnector(serviceSpecificConnector); SearchIntegratorContext integratorContext = new SearchIntegratorContext(connectorId, @@ -180,7 +177,6 @@ public IntegrationContext setContext(String connectorId, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName, IntegrationServiceDescription.SEARCH_INTEGRATOR_OMIS.getIntegrationServiceFullName(), diff --git a/open-metadata-implementation/integration-services/security-integrator/security-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/security/connector/SecurityIntegratorContext.java b/open-metadata-implementation/integration-services/security-integrator/security-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/security/connector/SecurityIntegratorContext.java index 24cf0c97da8..33f76e9cfeb 100644 --- a/open-metadata-implementation/integration-services/security-integrator/security-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/security/connector/SecurityIntegratorContext.java +++ b/open-metadata-implementation/integration-services/security-integrator/security-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/security/connector/SecurityIntegratorContext.java @@ -23,7 +23,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import java.util.Date; @@ -57,7 +56,6 @@ public class SecurityIntegratorContext extends IntegrationContext * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the asset manager * @param externalSourceName unique name of the software server capability for the asset manager * @param auditLog logging destination @@ -73,7 +71,6 @@ public SecurityIntegratorContext(String connectorId, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName, AuditLog auditLog) @@ -88,8 +85,7 @@ public SecurityIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); this.securityManagerClient = securityManagerClient; this.eventClient = eventClient; diff --git a/open-metadata-implementation/integration-services/security-integrator/security-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/security/contextmanager/SecurityIntegratorContextManager.java b/open-metadata-implementation/integration-services/security-integrator/security-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/security/contextmanager/SecurityIntegratorContextManager.java index 3f63e779d5c..45c70903c63 100644 --- a/open-metadata-implementation/integration-services/security-integrator/security-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/security/contextmanager/SecurityIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/security-integrator/security-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/security/contextmanager/SecurityIntegratorContextManager.java @@ -7,7 +7,6 @@ import org.odpi.openmetadata.accessservices.securitymanager.client.rest.SecurityManagerRESTClient; import org.odpi.openmetadata.accessservices.securitymanager.properties.SecurityManagerProperties; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -206,12 +205,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - - SecurityManagerEventClient eventClient = new SecurityManagerEventClient(partnerOMASServerName, partnerOMASPlatformRootURL, localServerUserId, @@ -231,7 +224,6 @@ public IntegrationContext setContext(String connectorId, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName, auditLog); diff --git a/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/topic/connector/TopicIntegratorContext.java b/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/topic/connector/TopicIntegratorContext.java index 3fd7e2edabe..28eba6b88c4 100644 --- a/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/topic/connector/TopicIntegratorContext.java +++ b/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-api/src/main/java/org/odpi/openmetadata/integrationservices/topic/connector/TopicIntegratorContext.java @@ -45,7 +45,6 @@ import org.odpi.openmetadata.frameworks.governanceaction.client.OpenMetadataClient; import org.odpi.openmetadata.frameworks.integration.client.OpenIntegrationClient; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import java.util.List; @@ -79,7 +78,6 @@ public class TopicIntegratorContext extends IntegrationContext * @param permittedSynchronization the direction of integration permitted by the integration connector * @param integrationConnectorGUID unique identifier for the integration connector if it is started via an integration group (otherwise it is * null). - * @param integrationGovernanceContext populated governance context for the connector's use * @param externalSourceGUID unique identifier of the software server capability for the asset manager * @param externalSourceName unique name of the software server capability for the asset manager */ @@ -96,7 +94,6 @@ public TopicIntegratorContext(String connectorId, boolean generateIntegrationReport, PermittedSynchronization permittedSynchronization, String integrationConnectorGUID, - IntegrationGovernanceContext integrationGovernanceContext, String externalSourceGUID, String externalSourceName) { @@ -110,8 +107,7 @@ public TopicIntegratorContext(String connectorId, permittedSynchronization, externalSourceGUID, externalSourceName, - integrationConnectorGUID, - integrationGovernanceContext); + integrationConnectorGUID); this.eventBrokerClient = eventBrokerClient; this.connectionManagerClient = connectionManagerClient; @@ -211,7 +207,14 @@ public String createTopic(TopicProperties topicProperties) throws InvalidParamet UserNotAuthorizedException, PropertyServerException { - return eventBrokerClient.createTopic(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, topicProperties); + String topicGUID = eventBrokerClient.createTopic(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, topicProperties); + + if ((topicGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(topicGUID); + } + + return topicGUID; } @@ -232,7 +235,19 @@ public String createTopicFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return eventBrokerClient.createTopicFromTemplate(userId, externalSourceGUID, externalSourceName, externalSourceIsHome, templateGUID, templateProperties); + String topicGUID = eventBrokerClient.createTopicFromTemplate(userId, + externalSourceGUID, + externalSourceName, + externalSourceIsHome, + templateGUID, + templateProperties); + + if ((topicGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(topicGUID); + } + + return topicGUID; } @@ -254,6 +269,11 @@ public void updateTopic(String topicGUID, PropertyServerException { eventBrokerClient.updateTopic(userId, externalSourceGUID, externalSourceName, topicGUID, isMergeUpdate, topicProperties); + + if ((topicGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementUpdate(topicGUID); + } } @@ -273,6 +293,11 @@ public void publishTopic(String topicGUID) throws InvalidParameterException, PropertyServerException { eventBrokerClient.publishTopic(userId, topicGUID); + + if ((topicGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementUpdate(topicGUID); + } } @@ -292,6 +317,11 @@ public void withdrawTopic(String topicGUID) throws InvalidParameterException, PropertyServerException { eventBrokerClient.withdrawTopic(userId, topicGUID); + + if ((topicGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementUpdate(topicGUID); + } } @@ -311,6 +341,11 @@ public void removeTopic(String topicGUID, PropertyServerException { eventBrokerClient.removeTopic(userId, externalSourceGUID, externalSourceName, topicGUID, qualifiedName); + + if ((topicGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementDelete(topicGUID); + } } @@ -423,14 +458,23 @@ public String createEventType(String topicGUID, UserNotAuthorizedException, PropertyServerException { + String eventTypeGUID; if (externalSourceIsHome) { - return eventBrokerClient.createEventType(userId, externalSourceGUID, externalSourceName, topicGUID, properties); + eventTypeGUID = eventBrokerClient.createEventType(userId, externalSourceGUID, externalSourceName, topicGUID, properties); } else { - return eventBrokerClient.createEventType(userId, null, null, topicGUID, properties); + eventTypeGUID = eventBrokerClient.createEventType(userId, null, null, topicGUID, properties); + } + + if ((eventTypeGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(eventTypeGUID, topicGUID); + integrationReportWriter.reportElementCreation(eventTypeGUID); } + + return eventTypeGUID; } @@ -454,14 +498,34 @@ public String createEventTypeFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { + String eventTypeGUID; + if (externalSourceIsHome) { - return eventBrokerClient.createEventTypeFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, topicGUID, templateProperties); + eventTypeGUID = eventBrokerClient.createEventTypeFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + topicGUID, + templateProperties); } else { - return eventBrokerClient.createEventTypeFromTemplate(userId, null, null, templateGUID, topicGUID, templateProperties); + eventTypeGUID = eventBrokerClient.createEventTypeFromTemplate(userId, + null, + null, + templateGUID, + topicGUID, + templateProperties); + } + + if ((eventTypeGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.setAnchor(eventTypeGUID, topicGUID); + integrationReportWriter.reportElementCreation(eventTypeGUID); } + + return eventTypeGUID; } @@ -483,6 +547,11 @@ public void updateEventType(String eventTypeGUID, PropertyServerException { eventBrokerClient.updateEventType(userId, externalSourceGUID, externalSourceName, eventTypeGUID, isMergeUpdate, properties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(eventTypeGUID); + } } @@ -502,6 +571,11 @@ public void removeEventType(String eventTypeGUID, PropertyServerException { eventBrokerClient.removeEventType(userId, externalSourceGUID, externalSourceName, eventTypeGUID, qualifiedName); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(eventTypeGUID); + } } @@ -622,7 +696,7 @@ public EventTypeElement getEventTypeByGUID(String guid) throws InvalidParameterE /* ===================================================================================================================== * A schemaType is used to describe complex structures found in the schema of an event type */ - + /** * Create a new metadata element to represent a primitive schema type such as a string, integer or character. * @@ -638,14 +712,22 @@ public String createPrimitiveSchemaType(PrimitiveSchemaTypeProperties schemaType UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; if (externalSourceIsHome) { - return eventBrokerClient.createPrimitiveSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + schemaTypeGUID = eventBrokerClient.createPrimitiveSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); } else { - return eventBrokerClient.createPrimitiveSchemaType(userId, null, null, schemaTypeProperties); + schemaTypeGUID = eventBrokerClient.createPrimitiveSchemaType(userId, null, null, schemaTypeProperties); } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -664,14 +746,23 @@ public String createLiteralSchemaType(LiteralSchemaTypeProperties schemaTypeProp UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return eventBrokerClient.createLiteralSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + schemaTypeGUID = eventBrokerClient.createLiteralSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); } else { - return eventBrokerClient.createLiteralSchemaType(userId, null, null, schemaTypeProperties); + schemaTypeGUID = eventBrokerClient.createLiteralSchemaType(userId, null, null, schemaTypeProperties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); } + + return schemaTypeGUID; } @@ -692,14 +783,31 @@ public String createEnumSchemaType(EnumSchemaTypeProperties schemaTypeProperties UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return eventBrokerClient.createEnumSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, validValuesSetGUID); + schemaTypeGUID = eventBrokerClient.createEnumSchemaType(userId, + externalSourceGUID, + externalSourceName, + schemaTypeProperties, + validValuesSetGUID); } else { - return eventBrokerClient.createEnumSchemaType(userId, null, null, schemaTypeProperties, validValuesSetGUID); + schemaTypeGUID = eventBrokerClient.createEnumSchemaType(userId, + null, + null, + schemaTypeProperties, + validValuesSetGUID); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); } + + return schemaTypeGUID; } @@ -766,24 +874,33 @@ public String createStructSchemaType(StructSchemaTypeProperties schemaTypeProper UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return eventBrokerClient.createStructSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); + schemaTypeGUID = eventBrokerClient.createStructSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties); } else { - return eventBrokerClient.createStructSchemaType(userId, null, null, schemaTypeProperties); + schemaTypeGUID = eventBrokerClient.createStructSchemaType(userId, null, null, schemaTypeProperties); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); } + + return schemaTypeGUID; } /** - * Create a new metadata element to represent a list of possible schema types that can be used for the attached schema attribute. + * Create a new metadata element to represent a list of possible schema types that can be used for the attached API parameter. * * @param schemaTypeProperties properties about the schema type to store - * @param schemaTypeOptionGUIDs list of unique identifiers for schema types that represent the options for the schema type choice * * @return unique identifier of the new schema type + * @param schemaTypeOptionGUIDs list of unique identifiers for schema types to link to * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -794,14 +911,24 @@ public String createSchemaTypeChoice(SchemaTypeChoiceProperties schemaTypeProper UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return eventBrokerClient.createSchemaTypeChoice(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, schemaTypeOptionGUIDs); + schemaTypeGUID = eventBrokerClient.createSchemaTypeChoice(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, + schemaTypeOptionGUIDs); } else { - return eventBrokerClient.createSchemaTypeChoice(userId, null, null, schemaTypeProperties, schemaTypeOptionGUIDs); + schemaTypeGUID = eventBrokerClient.createSchemaTypeChoice(userId, null, null, schemaTypeProperties, schemaTypeOptionGUIDs); + } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); } + + return schemaTypeGUID; } @@ -824,14 +951,33 @@ public String createMapSchemaType(MapSchemaTypeProperties schemaTypeProperties, UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return eventBrokerClient.createMapSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeProperties, mapFromSchemaTypeGUID, mapToSchemaTypeGUID); + schemaTypeGUID = eventBrokerClient.createMapSchemaType(userId, + externalSourceGUID, + externalSourceName, + schemaTypeProperties, + mapFromSchemaTypeGUID, + mapToSchemaTypeGUID); } else { - return eventBrokerClient.createMapSchemaType(userId, null, null, schemaTypeProperties, mapFromSchemaTypeGUID, mapToSchemaTypeGUID); + schemaTypeGUID = eventBrokerClient.createMapSchemaType(userId, + null, + null, + schemaTypeProperties, + mapFromSchemaTypeGUID, + mapToSchemaTypeGUID); } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -852,14 +998,31 @@ public String createSchemaTypeFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { + String schemaTypeGUID; + if (externalSourceIsHome) { - return eventBrokerClient.createSchemaTypeFromTemplate(userId, externalSourceGUID, externalSourceName, templateGUID, templateProperties); + schemaTypeGUID = eventBrokerClient.createSchemaTypeFromTemplate(userId, + externalSourceGUID, + externalSourceName, + templateGUID, + templateProperties); } else { - return eventBrokerClient.createSchemaTypeFromTemplate(userId, null, null, templateGUID, templateProperties); + schemaTypeGUID = eventBrokerClient.createSchemaTypeFromTemplate(userId, + null, + null, + templateGUID, + templateProperties); } + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementCreation(schemaTypeGUID); + } + + return schemaTypeGUID; } @@ -882,6 +1045,11 @@ public void updateSchemaType(String schemaTypeGUID, PropertyServerException { eventBrokerClient.updateSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeGUID, isMergeUpdate, schemaTypeProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(schemaTypeGUID); + } } @@ -899,6 +1067,11 @@ public void removeSchemaType(String schemaTypeGUID) throws InvalidParameterExcep PropertyServerException { eventBrokerClient.removeSchemaType(userId, externalSourceGUID, externalSourceName, schemaTypeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(schemaTypeGUID); + } } @@ -922,7 +1095,19 @@ public void setupSchemaElementRelationship(String endOneGUID, UserNotAuthorizedException, PropertyServerException { - eventBrokerClient.setupSchemaElementRelationship(userId, externalSourceGUID, externalSourceName, endOneGUID, endTwoGUID, relationshipTypeName, properties); + eventBrokerClient.setupSchemaElementRelationship(userId, + externalSourceGUID, + externalSourceName, + endOneGUID, + endTwoGUID, + relationshipTypeName, + properties); + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(endTwoGUID, endOneGUID); + integrationReportWriter.reportElementUpdate(endOneGUID); + } } @@ -1079,14 +1264,31 @@ public String createSchemaAttribute(String schemaElementGUID, UserNotAuthorizedException, PropertyServerException { + String schemaAttributeGUID; + if (externalSourceIsHome) { - return eventBrokerClient.createSchemaAttribute(userId, externalSourceGUID, externalSourceName, schemaElementGUID, schemaAttributeProperties); + schemaAttributeGUID = eventBrokerClient.createSchemaAttribute(userId, + externalSourceGUID, + externalSourceName, + schemaElementGUID, + schemaAttributeProperties); } else { - return eventBrokerClient.createSchemaAttribute(userId, null, null, schemaElementGUID, schemaAttributeProperties); + schemaAttributeGUID = eventBrokerClient.createSchemaAttribute(userId, + null, + null, + schemaElementGUID, + schemaAttributeProperties); + } + + if ((schemaAttributeGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(schemaElementGUID); } + + return schemaAttributeGUID; } @@ -1109,14 +1311,33 @@ public String createSchemaAttributeFromTemplate(String schemaElement UserNotAuthorizedException, PropertyServerException { + String schemaAttributeGUID; + if (externalSourceIsHome) { - return eventBrokerClient.createSchemaAttributeFromTemplate(userId, externalSourceGUID, externalSourceName, schemaElementGUID, templateGUID, templateProperties); + schemaAttributeGUID = eventBrokerClient.createSchemaAttributeFromTemplate(userId, + externalSourceGUID, + externalSourceName, + schemaElementGUID, + templateGUID, + templateProperties); } else { - return eventBrokerClient.createSchemaAttributeFromTemplate(userId, null, null, schemaElementGUID, templateGUID, templateProperties); + schemaAttributeGUID = eventBrokerClient.createSchemaAttributeFromTemplate(userId, + null, + null, + schemaElementGUID, + templateGUID, + templateProperties); + } + + if ((schemaAttributeGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(schemaElementGUID); } + + return schemaAttributeGUID; } @@ -1145,6 +1366,11 @@ public void setupSchemaType(String relationshipTypeName, { eventBrokerClient.setupSchemaType(userId, null, null, relationshipTypeName, schemaAttributeGUID, schemaTypeGUID); } + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(schemaTypeGUID, schemaAttributeGUID); + } } @@ -1162,6 +1388,11 @@ public void clearSchemaTypes(String schemaAttributeGUID) throws InvalidParameter PropertyServerException { eventBrokerClient.clearSchemaTypes(userId, externalSourceGUID, externalSourceName, schemaAttributeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(schemaAttributeGUID); + } } @@ -1182,7 +1413,17 @@ public void updateSchemaAttribute(String schemaAttributeGUID, UserNotAuthorizedException, PropertyServerException { - eventBrokerClient.updateSchemaAttribute(userId, externalSourceGUID, externalSourceName, schemaAttributeGUID, isMergeUpdate, schemaAttributeProperties); + eventBrokerClient.updateSchemaAttribute(userId, + externalSourceGUID, + externalSourceName, + schemaAttributeGUID, + isMergeUpdate, + schemaAttributeProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(schemaAttributeGUID); + } } @@ -1200,6 +1441,11 @@ public void removeSchemaAttribute(String schemaAttributeGUID) throws InvalidPara PropertyServerException { eventBrokerClient.removeSchemaAttribute(userId, externalSourceGUID, externalSourceName, schemaAttributeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(schemaAttributeGUID); + } } @@ -1297,8 +1543,6 @@ public SchemaAttributeElement getSchemaAttributeByGUID(String schemaAttributeGUI } - - /* ===================================================================================================================== * A Connection is the top level object for working with connectors */ @@ -1318,7 +1562,14 @@ public String createConnection(ConnectionProperties connectionProperties) throws UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createConnection(userId, null, null, connectionProperties); + String connectionGUID = connectionManagerClient.createConnection(userId, null, null, connectionProperties); + + if ((connectionGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(connectionGUID); + } + + return connectionGUID; } @@ -1339,7 +1590,18 @@ public String createConnectionFromTemplate(String templateGUID, UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createConnectionFromTemplate(userId, null, null, templateGUID, templateProperties); + String connectionGUID = connectionManagerClient.createConnectionFromTemplate(userId, + null, + null, + templateGUID, + templateProperties); + + if ((connectionGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(connectionGUID); + } + + return connectionGUID; } @@ -1362,14 +1624,19 @@ public void updateConnection(String connectionGUID, PropertyServerException { connectionManagerClient.updateConnection(userId, externalSourceGUID, externalSourceName, connectionGUID, isMergeUpdate, connectionProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } /** * Create a relationship between a connection and a connector type. * - * @param connectionGUID unique identifier of the connection - * @param connectorTypeGUID unique identifier of the connector type + * @param connectionGUID unique identifier of the connection in the external data manager + * @param connectorTypeGUID unique identifier of the connector type in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1381,14 +1648,19 @@ public void setupConnectorType(String connectionGUID, PropertyServerException { connectionManagerClient.setupConnectorType(userId, null, null, connectionGUID, connectorTypeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } /** * Remove a relationship between a connection and a connector type. * - * @param connectionGUID unique identifier of the connection - * @param connectorTypeGUID unique identifier of the connector type + * @param connectionGUID unique identifier of the connection in the external data manager + * @param connectorTypeGUID unique identifier of the connector type in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1400,14 +1672,19 @@ public void clearConnectorType(String connectionGUID, PropertyServerException { connectionManagerClient.clearConnectorType(userId, externalSourceGUID, externalSourceName, connectionGUID, connectorTypeGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } /** * Create a relationship between a connection and an endpoint. * - * @param connectionGUID unique identifier of the connection - * @param endpointGUID unique identifier of the endpoint + * @param connectionGUID unique identifier of the connection in the external data manager + * @param endpointGUID unique identifier of the endpoint in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1419,14 +1696,19 @@ public void setupEndpoint(String connectionGUID, PropertyServerException { connectionManagerClient.setupEndpoint(userId, null, null, connectionGUID, endpointGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } /** * Remove a relationship between a connection and an endpoint. * - * @param connectionGUID unique identifier of the connection - * @param endpointGUID unique identifier of the endpoint + * @param connectionGUID unique identifier of the connection in the external data manager + * @param endpointGUID unique identifier of the endpoint in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1438,17 +1720,22 @@ public void clearEndpoint(String connectionGUID, PropertyServerException { connectionManagerClient.clearEndpoint(userId, externalSourceGUID, externalSourceName, connectionGUID, endpointGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(connectionGUID); + } } /** * Create a relationship between a virtual connection and an embedded connection. * - * @param connectionGUID unique identifier of the virtual connection + * @param connectionGUID unique identifier of the virtual connection in the external data manager * @param position which order should this connection be processed * @param arguments What additional properties should be passed to the embedded connector via the configuration properties * @param displayName what does this connector signify? - * @param embeddedConnectionGUID unique identifier of the embedded connection + * @param embeddedConnectionGUID unique identifier of the embedded connection in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1463,14 +1750,20 @@ public void setupEmbeddedConnection(String connectionGUID, PropertyServerException { connectionManagerClient.setupEmbeddedConnection(userId, null, null, connectionGUID, position, displayName, arguments, embeddedConnectionGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(embeddedConnectionGUID, connectionGUID); + integrationReportWriter.reportElementUpdate(embeddedConnectionGUID); + } } /** * Remove a relationship between a virtual connection and an embedded connection. * - * @param connectionGUID unique identifier of the virtual connection - * @param embeddedConnectionGUID unique identifier of the embedded connection + * @param connectionGUID unique identifier of the virtual connection in the external data manager + * @param embeddedConnectionGUID unique identifier of the embedded connection in the external data manager * * @throws InvalidParameterException one of the parameters is invalid * @throws UserNotAuthorizedException the user is not authorized to issue this request @@ -1482,6 +1775,12 @@ public void clearEmbeddedConnection(String connectionGUID, PropertyServerException { connectionManagerClient.clearEmbeddedConnection(userId, externalSourceGUID, externalSourceName, connectionGUID, embeddedConnectionGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setParent(embeddedConnectionGUID, connectionGUID); + integrationReportWriter.reportElementUpdate(embeddedConnectionGUID); + } } @@ -1503,6 +1802,12 @@ public void setupAssetConnection(String assetGUID, PropertyServerException { connectionManagerClient.setupAssetConnection(userId, null, null, assetGUID, assetSummary, connectionGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(connectionGUID, assetGUID); + integrationReportWriter.reportElementUpdate(connectionGUID); + } } @@ -1522,8 +1827,13 @@ public void clearAssetConnection(String assetGUID, PropertyServerException { connectionManagerClient.clearAssetConnection(userId, externalSourceGUID, externalSourceName, assetGUID, connectionGUID); - } + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(connectionGUID, assetGUID); + integrationReportWriter.reportElementUpdate(connectionGUID); + } + } /** @@ -1571,7 +1881,7 @@ public List findConnections(String searchString, * Retrieve the list of metadata elements with a matching qualified or display name. * There are no wildcards supported on this request. * - * @param name name of the connection to retrieve + * @param name name used to retrieve the connection * @param startFrom paging start point * @param pageSize maximum results that can be returned * @@ -1625,7 +1935,14 @@ public String createEndpoint(EndpointProperties endpointProperties) throws Inval UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createEndpoint(userId, null, null, endpointProperties); + String endpointGUID = connectionManagerClient.createEndpoint(userId, null, null, endpointProperties); + + if ((endpointGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(endpointGUID); + } + + return endpointGUID; } @@ -1648,7 +1965,19 @@ public String createEndpointFromTemplate(String networkAddress, UserNotAuthorizedException, PropertyServerException { - return connectionManagerClient.createEndpointFromTemplate(userId, null, null, networkAddress, templateGUID, templateProperties); + String endpointGUID = connectionManagerClient.createEndpointFromTemplate(userId, + externalSourceGUID, + externalSourceName, + networkAddress, + templateGUID, + templateProperties); + + if ((endpointGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(endpointGUID); + } + + return endpointGUID; } @@ -1671,9 +2000,12 @@ public void updateEndpoint(boolean isMergeUpdate, PropertyServerException { connectionManagerClient.updateEndpoint(userId, externalSourceGUID, externalSourceName, isMergeUpdate, endpointGUID, endpointProperties); - } - + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(endpointGUID); + } + } /** @@ -1690,6 +2022,11 @@ public void removeEndpoint(String endpointGUID) throws InvalidParameterException PropertyServerException { connectionManagerClient.removeEndpoint(userId, externalSourceGUID, externalSourceName, endpointGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(endpointGUID); + } } @@ -1827,10 +2164,8 @@ public ConnectorTypeElement getConnectorTypeByGUID(String connectorTypeGUID) thr } - - /* ===================================================================================================================== - * A ValidValue is the top level object for working with connectors + * A ValidValue is the top level object for working with valid values */ /** @@ -1848,7 +2183,14 @@ public String createValidValue(ValidValueProperties validValueProperties) throws UserNotAuthorizedException, PropertyServerException { - return validValueManagement.createValidValue(userId, externalSourceGUID, externalSourceName, validValueProperties); + String validValueGUID = validValueManagement.createValidValue(userId, externalSourceGUID, externalSourceName, validValueProperties); + + if ((validValueGUID != null) && (integrationReportWriter != null)) + { + integrationReportWriter.reportElementCreation(validValueGUID); + } + + return validValueGUID; } @@ -1871,6 +2213,11 @@ public void updateValidValue(String validValueGUID, PropertyServerException { validValueManagement.updateValidValue(userId, externalSourceGUID, externalSourceName, validValueGUID, isMergeUpdate, validValueProperties); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(validValueGUID); + } } @@ -1892,6 +2239,12 @@ public void setupValidValueMember(String validValueSetGU PropertyServerException { validValueManagement.setupValidValueMember(userId, externalSourceGUID, externalSourceName, validValueSetGUID, properties, validValueMemberGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(validValueMemberGUID, validValueSetGUID); + integrationReportWriter.reportElementUpdate(validValueSetGUID); + } } @@ -1911,6 +2264,12 @@ public void clearValidValueMember(String validValueSetGUID, PropertyServerException { validValueManagement.clearValidValueMember(userId, externalSourceGUID, externalSourceName, validValueSetGUID, validValueMemberGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.setAnchor(validValueMemberGUID, validValueSetGUID); + integrationReportWriter.reportElementUpdate(validValueSetGUID); + } } @@ -1933,6 +2292,11 @@ public void setupValidValues(String elementGUID, PropertyServerException { validValueManagement.setupValidValues(userId, externalSourceGUID, externalSourceName, elementGUID, properties, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } } @@ -1952,6 +2316,11 @@ public void clearValidValues(String elementGUID, PropertyServerException { validValueManagement.clearValidValues(userId, externalSourceGUID, externalSourceName, elementGUID, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } } @@ -1974,6 +2343,11 @@ public void setupReferenceValueTag(String elementGUI PropertyServerException { validValueManagement.setupReferenceValueTag(userId, externalSourceGUID, externalSourceName, elementGUID, properties, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } } @@ -1993,6 +2367,11 @@ public void clearReferenceValueTag(String elementGUID, PropertyServerException { validValueManagement.clearReferenceValueTag(userId, externalSourceGUID, externalSourceName, elementGUID, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementUpdate(elementGUID); + } } @@ -2010,6 +2389,11 @@ public void removeValidValue(String validValueGUID) throws InvalidParameterExcep PropertyServerException { validValueManagement.removeValidValue(userId, externalSourceGUID, externalSourceName, validValueGUID); + + if (integrationReportWriter != null) + { + integrationReportWriter.reportElementDelete(validValueGUID); + } } diff --git a/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/topic/contextmanager/TopicIntegratorContextManager.java b/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/topic/contextmanager/TopicIntegratorContextManager.java index b9f56d46f02..1601e43ef65 100644 --- a/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/topic/contextmanager/TopicIntegratorContextManager.java +++ b/open-metadata-implementation/integration-services/topic-integrator/topic-integrator-server/src/main/java/org/odpi/openmetadata/integrationservices/topic/contextmanager/TopicIntegratorContextManager.java @@ -7,7 +7,6 @@ import org.odpi.openmetadata.accessservices.datamanager.client.rest.DataManagerRESTClient; import org.odpi.openmetadata.accessservices.datamanager.properties.EventBrokerProperties; import org.odpi.openmetadata.frameworks.integration.context.IntegrationContext; -import org.odpi.openmetadata.frameworks.integration.context.IntegrationGovernanceContext; import org.odpi.openmetadata.frameworks.integration.contextmanager.PermittedSynchronization; import org.odpi.openmetadata.frameworks.auditlog.AuditLog; import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException; @@ -220,11 +219,6 @@ public IntegrationContext setContext(String connectorId, externalSourceName = null; } - IntegrationGovernanceContext integrationGovernanceContext = constructIntegrationGovernanceContext(openMetadataStoreClient, - connectorUserId, - externalSourceGUID, - externalSourceName); - DataManagerEventClient dataManagerEventClient = new DataManagerEventClient(partnerOMASServerName, partnerOMASPlatformRootURL, restClient, @@ -245,7 +239,6 @@ public IntegrationContext setContext(String connectorId, generateIntegrationReport, permittedSynchronization, integrationConnectorGUID, - integrationGovernanceContext, externalSourceGUID, externalSourceName); serviceSpecificConnector.setContext(integratorContext);