diff --git a/open-metadata-distribution/README.md b/open-metadata-distribution/README.md
index 003764a9673..df70a723bf9 100644
--- a/open-metadata-distribution/README.md
+++ b/open-metadata-distribution/README.md
@@ -3,11 +3,10 @@
# Open Metadata Distribution
-This module collects together the Egeria artifacts that are designed for
-used by external consuming websites and technologies. This includes:
+This module collects together the Egeria artifacts for different scenarios. This includes:
-* The **[Maven packages](open-metadata-packages)** used to embed Egeria into different technologies.
-* The **[assemblies](open-metadata-assemblies)** that provide executables for servers and tool kits.
+* The **[OMAG Server Platform Assembly](omag-server-platform)** assembles the libraries and files for the OMAG Server Platform plus optional resources for use with the platform.
+* The **[Open Metadata Assembly](open-metadata-assemblies)** provides a combination of the OMAG Server Platform and the Egeria UI Application. This is a legacy and is being replaced with the more specialized assemblies described above.
diff --git a/open-metadata-distribution/omag-server-platform/README.md b/open-metadata-distribution/omag-server-platform/README.md
new file mode 100644
index 00000000000..a81a1126105
--- /dev/null
+++ b/open-metadata-distribution/omag-server-platform/README.md
@@ -0,0 +1,16 @@
+
+
+
+# OMAG Server Platform Distribution TAR file
+
+The **OMAG Server Platform** module creates a distribution **tar** file that can be copied
+and used to install Egeria's OMAG Server Platform. For further information see
+[Installing Egeria Tutorial](https://egeria-project.org/education/tutorials/installing-egeria-tutorial).
+
+----
+License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
+Copyright Contributors to the ODPi Egeria project.
+
+
+
+
\ No newline at end of file
diff --git a/open-metadata-distribution/omag-server-platform/build.gradle b/open-metadata-distribution/omag-server-platform/build.gradle
new file mode 100644
index 00000000000..90a6577f8fd
--- /dev/null
+++ b/open-metadata-distribution/omag-server-platform/build.gradle
@@ -0,0 +1,254 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ * Copyright Contributors to the ODPi Egeria project.
+ */
+
+
+plugins {
+ id 'distribution'
+}
+
+apply plugin: 'distribution'
+
+jar.enabled=false
+
+description = 'OMAG Server Platform Assembly'
+
+dependencies {
+
+ // Dependencies for the main platform assembly - this is modeled on the pom.xml
+ // In future we may be able to select by type or label
+ implementation project(':open-metadata-implementation:platform-chassis:platform-chassis-spring')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-console-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-event-topic-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-file-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-slf4j-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:cohort-registry-store-connectors:cohort-registry-file-store-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-collection-store-connectors:graph-repository-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-collection-store-connectors:omrs-rest-repository-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-collection-store-connectors:inmemory-repository-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:avro-file-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:basic-file-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:csv-file-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:data-folder-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:jdbc-resource-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:configuration-store-connectors:configuration-encrypted-file-store-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:configuration-store-connectors:configuration-file-store-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:files-integration-connectors')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:kafka-integration-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:atlas-integration-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:jdbc-integration-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:openapi-integration-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:openlineage-integration-connectors')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:elasticsearch-integration-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:discovery-service-connectors')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:dynamic-archiver-connectors')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:governance-action-connectors')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:event-bus-connectors:open-metadata-topic-connectors:inmemory-open-metadata-topic-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:event-bus-connectors:open-metadata-topic-connectors:kafka-open-metadata-topic-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:open-lineage-connectors:open-lineage-janus-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-archive-connectors:open-metadata-archive-file-connector')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-archive-connectors:open-metadata-archive-directory-connector')
+ implementation project(':open-metadata-resources:open-metadata-samples:open-metadata-security-samples')
+ implementation project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:spring-rest-client-connector')
+ implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:asset-management-samples:asset-create-avro-sample')
+ implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:asset-management-samples:asset-create-csv-sample')
+ implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:asset-management-samples:asset-reader-avro-sample')
+ implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:asset-management-samples:asset-reader-csv-sample')
+ implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:governance-program-client-samples:governance-leadership-sample')
+ implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:governance-program-client-samples:governance-subject-area-sample')
+ implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:governance-program-client-samples:governance-zone-create-sample')
+ implementation project(':open-metadata-resources:open-metadata-samples:access-services-samples:subject-area-client-samples:subject-area-definition-sample')
+ implementation project(':open-metadata-implementation:access-services:asset-catalog:asset-catalog-client')
+ implementation project(':open-metadata-implementation:access-services:asset-consumer:asset-consumer-client')
+ implementation project(':open-metadata-implementation:access-services:asset-lineage:asset-lineage-client')
+ implementation project(':open-metadata-implementation:access-services:asset-manager:asset-manager-client')
+ implementation project(':open-metadata-implementation:access-services:asset-owner:asset-owner-client')
+ implementation project(':open-metadata-implementation:access-services:data-engine:data-engine-client')
+ implementation project(':open-metadata-implementation:access-services:it-infrastructure:it-infrastructure-client')
+ implementation project(':open-metadata-implementation:access-services:data-manager:data-manager-client')
+ implementation project(':open-metadata-implementation:access-services:data-privacy:data-privacy-client')
+ implementation project(':open-metadata-implementation:access-services:dev-ops:dev-ops-client')
+ implementation project(':open-metadata-implementation:access-services:digital-architecture:digital-architecture-client')
+ implementation project(':open-metadata-implementation:access-services:digital-service:digital-service-client')
+ implementation project(':open-metadata-implementation:access-services:discovery-engine:discovery-engine-client')
+ implementation project(':open-metadata-implementation:access-services:governance-engine:governance-engine-client')
+ implementation project(':open-metadata-implementation:access-services:governance-program:governance-program-client')
+ implementation project(':open-metadata-implementation:access-services:project-management:project-management-client')
+ implementation project(':open-metadata-implementation:access-services:security-officer:security-officer-client')
+ implementation project(':open-metadata-implementation:access-services:security-manager:security-manager-client')
+ implementation project(':open-metadata-implementation:access-services:software-developer:software-developer-client')
+ implementation project(':open-metadata-implementation:access-services:subject-area:subject-area-client')
+ implementation project(':open-metadata-implementation:engine-services:repository-governance:repository-governance-client')
+ implementation project(':open-metadata-implementation:engine-services:asset-analysis:asset-analysis-client')
+ implementation project(':open-metadata-implementation:engine-services:governance-action:governance-action-client')
+ implementation project(':open-metadata-implementation:integration-services:analytics-integrator:analytics-integrator-client')
+ implementation project(':open-metadata-implementation:integration-services:api-integrator:api-integrator-client')
+ implementation project(':open-metadata-implementation:integration-services:catalog-integrator:catalog-integrator-client')
+ implementation project(':open-metadata-implementation:integration-services:files-integrator:files-integrator-client')
+ implementation project(':open-metadata-implementation:integration-services:database-integrator:database-integrator-client')
+ implementation project(':open-metadata-implementation:integration-services:display-integrator:display-integrator-client')
+ implementation project(':open-metadata-implementation:integration-services:lineage-integrator:lineage-integrator-client')
+ implementation project(':open-metadata-implementation:integration-services:organization-integrator:organization-integrator-client')
+ implementation project(':open-metadata-implementation:integration-services:security-integrator:security-integrator-client')
+ implementation project(':open-metadata-implementation:integration-services:topic-integrator:topic-integrator-client')
+ implementation project(':open-metadata-implementation:integration-services:search-integrator:search-integrator-client')
+ implementation project(':open-metadata-implementation:governance-servers:engine-host-services:engine-host-services-client')
+ implementation project(':open-metadata-implementation:governance-servers:integration-daemon-services:integration-daemon-services-client')
+ implementation project(':open-metadata-implementation:governance-servers:open-lineage-services:open-lineage-services-client')
+ implementation project(':open-metadata-implementation:admin-services:admin-services-client')
+ implementation project(':open-metadata-implementation:user-interfaces:ui-chassis:ui-chassis-spring')
+ implementation project(':open-metadata-conformance-suite:open-metadata-conformance-suite-client')
+ implementation project(':open-metadata-resources:open-metadata-samples:admin-services-samples:admin-services-config-metadata-server-sample')
+ implementation project(':open-metadata-resources:open-metadata-archives:open-metadata-types-utility')
+ implementation project(':open-metadata-resources:open-metadata-archives:open-connector-archives')
+ implementation project(':open-metadata-resources:open-metadata-archives:design-model-archives:glossary-canonical-model')
+ implementation project(':open-metadata-resources:open-metadata-samples:sample-metadata:big-glossaries')
+ implementation project(':open-metadata-resources:open-metadata-samples:governance-services-sample')
+
+}
+
+distributions {
+ egeriaomag {
+ //distributionBaseName = "${rootProject.name}-distribution"
+ contents {
+ into('platform') {
+ // OMAG Server Platform - new name consistent with documentation
+ from { project(':open-metadata-implementation:platform-chassis:platform-chassis-spring').bootJar }
+ rename { String fileName ->
+ fileName.replace("platform-chassis-spring", "omag-server-platform")
+ }
+ fileMode = 0755
+ }
+ into('platform/extra') {
+ // Identify how
+ from { "$rootProject.projectDir/open-metadata-distribution/omag-server-platform/docs" }
+ rename { String fileName ->
+ fileName.replace("extraREADME.md", "README.md")
+ }
+ fileMode = 0755
+ }
+ into('platform/lib') {
+ // All our connectors, plus discovery sample & the sample Coco security connectors
+ from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-console-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-event-topic-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-file-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:audit-log-connectors:audit-log-slf4j-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:cohort-registry-store-connectors:cohort-registry-file-store-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-archive-connectors:open-metadata-archive-file-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-archive-connectors:open-metadata-archive-directory-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-collection-store-connectors:inmemory-repository-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-collection-store-connectors:graph-repository-connector').fatJar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:repository-services-connectors:open-metadata-collection-store-connectors:omrs-rest-repository-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:avro-file-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:basic-file-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:csv-file-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:file-connectors:data-folder-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:jdbc-resource-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:configuration-store-connectors:configuration-encrypted-file-store-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:configuration-store-connectors:configuration-file-store-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:discovery-service-connectors').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:dynamic-archiver-connectors').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:governance-action-connectors').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:files-integration-connectors').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:atlas-integration-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:kafka-integration-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:jdbc-integration-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:openapi-integration-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:openlineage-integration-connectors').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:integration-connectors:elasticsearch-integration-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:event-bus-connectors:open-metadata-topic-connectors:inmemory-open-metadata-topic-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:event-bus-connectors:open-metadata-topic-connectors:kafka-open-metadata-topic-connector').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:open-lineage-connectors:open-lineage-janus-connector').jar }
+ from { project(':open-metadata-resources:open-metadata-samples:open-metadata-security-samples').jar }
+ from { project(':open-metadata-implementation:adapters:open-connectors:rest-client-connectors:spring-rest-client-connector').jar }
+ from { project(':open-metadata-resources:open-metadata-samples:governance-services-sample').jar }
+ fileMode = 0755
+ }
+ into('etc/utilities') {
+ from { project(':open-metadata-resources:open-metadata-archives:design-model-archives:glossary-canonical-model').shadowJar }
+ from { project(':open-metadata-resources:open-metadata-archives:open-metadata-types-utility').shadowJar }
+ from { project(':open-metadata-resources:open-metadata-samples:sample-metadata:big-glossaries').shadowJar }
+ fileMode = 0755
+ }
+ into('opt/sample-clients') {
+ from { project(':open-metadata-resources:open-metadata-samples:access-services-samples:asset-management-samples:asset-create-avro-sample').shadowJar }
+ from { project(':open-metadata-resources:open-metadata-samples:access-services-samples:asset-management-samples:asset-create-csv-sample').shadowJar }
+ from { project(':open-metadata-resources:open-metadata-samples:access-services-samples:asset-management-samples:asset-reader-avro-sample').shadowJar }
+ from { project(':open-metadata-resources:open-metadata-samples:access-services-samples:asset-management-samples:asset-reader-csv-sample').shadowJar }
+ from { project(':open-metadata-resources:open-metadata-samples:access-services-samples:governance-program-client-samples:governance-leadership-sample').shadowJar }
+ from { project(':open-metadata-resources:open-metadata-samples:access-services-samples:governance-program-client-samples:governance-subject-area-sample').shadowJar }
+ from { project(':open-metadata-resources:open-metadata-samples:access-services-samples:governance-program-client-samples:governance-zone-create-sample').shadowJar }
+ from { project(':open-metadata-resources:open-metadata-samples:access-services-samples:subject-area-client-samples:subject-area-definition-sample').shadowJar }
+ from { project(':open-metadata-resources:open-metadata-samples:admin-services-samples:admin-services-config-metadata-server-sample').shadowJar }
+ fileMode = 0755
+ }
+ into('opt') {
+ from(rootProject.projectDir) {
+ include 'content-packs/*'
+ include 'sample-data/*/*'
+ }
+ fileMode = 0755
+ }
+ into('platform') {
+ from(rootProject.projectDir) {
+ include 'truststore.p12'
+ include 'keystore.p12'
+ include 'application.properties'
+ }
+ fileMode = 0755
+ }
+ into('') {
+ from(rootProject.projectDir) {
+ include 'NOTICE'
+ include 'LICENSE'
+ }
+ fileMode = 0755
+ }
+ }
+ }
+}
+// Override the distribution filenames to match what we use with maven (replaces baseName above)
+egeriaomagDistTar.compression = Compression.GZIP
+//egeriaomagDistTar.archiveExtension = 'tar.gz'
+egeriaomagDistTar.archiveFileName = (rootProject.name + '-platform-' + rootProject.version + '-distribution.tar.gz')
+egeriaomagDistZip.enabled=false // TODO: does not seem to work
+
+// Ditto for the deploy distribution
+
+
+task unzip(type: Copy) {
+ String zipFile = "${project.buildDir}/distributions/${rootProject.name}-platform-${rootProject.version}-distribution.tar.gz"
+ //def zipFile = (project.buildDir + '/distributions/' + rootProject.name + '-' + rootProject.version + '-distribution.tar.gz')
+ def outputDir = file("${buildDir}/unpacked")
+
+ from tarTree(zipFile)
+ into outputDir
+}
+
+egeriaomagDistTar.finalizedBy unzip
+
+// Define the output from this module - in this case our distributions
+sourceSets {
+ main {
+ output.dir("${project.buildDir}/distributions")
+ }
+}
+
+// Only complete when unzip is done
+build.dependsOn unzip
+
+// We don't want a published artifact from this module, as it's creating the final assembly
+// So disable all publish tasks inherited from the top level
+publish.onlyIf { false }
+generatePomFileForMavenmodulePublication.onlyIf { false }
+publishMavenmodulePublicationToMavenLocal.onlyIf { false }
+publishToMavenLocal.onlyIf { false }
+publishAllPublicationsToOSSRHRepository.onlyIf { false }
+publishMavenmodulePublicationToOSSRHRepository.onlyIf { false }
+generateMetadataFileForMavenmodulePublication.onlyIf { false }
+
+
+
+
+
diff --git a/open-metadata-distribution/omag-server-platform/docs/extraREADME.md b/open-metadata-distribution/omag-server-platform/docs/extraREADME.md
new file mode 100644
index 00000000000..e06a98406b0
--- /dev/null
+++ b/open-metadata-distribution/omag-server-platform/docs/extraREADME.md
@@ -0,0 +1,14 @@
+
+
+
+# Extra Libraries
+
+Use this directory to add jar files to the platform's classpath.
+
+----
+License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
+Copyright Contributors to the ODPi Egeria project.
+
+
+
+
\ No newline at end of file
diff --git a/open-metadata-distribution/omag-server-platform/docs/fileLayout.drawio b/open-metadata-distribution/omag-server-platform/docs/fileLayout.drawio
new file mode 100644
index 00000000000..fa667d3a5a1
--- /dev/null
+++ b/open-metadata-distribution/omag-server-platform/docs/fileLayout.drawio
@@ -0,0 +1,245 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/open-metadata-distribution/open-metadata-packages/README.md b/open-metadata-distribution/open-metadata-packages/README.md
deleted file mode 100644
index b0bd838640f..00000000000
--- a/open-metadata-distribution/open-metadata-packages/README.md
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-# Open Metadata Packages
-
-Egeria is packaged in a flexible structure to allow
-different metadata tools, engines and repositories to be
-integrated together in a range of deployment patterns -
-from simple projects to large multi-country,
-cross enterprise metadata support.
-
-The packages are summarized below.
-
-* **[Open Metadata Client Package](open-metadata-client-package)** - provides Java classes that call
-the Open Metadata Access Services (OMAS) REST APIs and helper classes for
-generating and parsing events for the OMASs in and out topic.
-These classes can be used from a Java client program or web application.
-
-* **[Open Metadata Caller Package](open-metadata-caller-package)** - provides the
-server-side support for the OMAS REST APIs. It can be combined with either
-the native or adapter packages below.
-
-* **[Open Metadata Native Package](open-metadata-native-package)** - provides a
-library of components to build a metadata repository
-and tools package that natively supports the Open Metadata and Governance APIs.
-
-* **[Open Metadata Adapter Package](open-metadata-adapter-package)** - provides the API and libraries for
-building a repository proxy to act as an open metadata adapter for an existing
-metadata repository that has proprietary interfaces.
-
-
-
-
-----
-License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
-Copyright Contributors to the ODPi Egeria project.
-
-
\ No newline at end of file
diff --git a/open-metadata-distribution/open-metadata-packages/open-metadata-adapter-package/README.md b/open-metadata-distribution/open-metadata-packages/open-metadata-adapter-package/README.md
deleted file mode 100644
index 54eb1ff3cea..00000000000
--- a/open-metadata-distribution/open-metadata-packages/open-metadata-adapter-package/README.md
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
-# Open Metadata Adapter Package
-
-The **open-metadata-adapter-package** provides a library of components to
-build a repository proxy server using **[Spring](../../../developer-resources/Spring.md)**.
-
-This package supports the development of metadata repositories that
-implement the **[Adapter Integration Pattern](https://egeria-project.org/concepts/repository-connector/)**.
-
-
-
-----
-License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
-Copyright Contributors to the ODPi Egeria project.
diff --git a/open-metadata-distribution/open-metadata-packages/open-metadata-caller-package/README.md b/open-metadata-distribution/open-metadata-packages/open-metadata-caller-package/README.md
deleted file mode 100644
index 982beb4a6c8..00000000000
--- a/open-metadata-distribution/open-metadata-packages/open-metadata-caller-package/README.md
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-# Open Metadata Caller Package
-
-The **open-metadata-caller-package** adds the server-side support for
-the Open Metadata Access Services (OMAS) implemented
-using **[Spring](../../../developer-resources/Spring.md)**.
-
-This package supports the **[Caller Integration Pattern](https://egeria-project.org/guides/developer/#using-the-omas-clients)**.
-
-
-
-----
-License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
-Copyright Contributors to the ODPi Egeria project.
-
-
\ No newline at end of file
diff --git a/open-metadata-distribution/open-metadata-packages/open-metadata-client-package/README.md b/open-metadata-distribution/open-metadata-packages/open-metadata-client-package/README.md
deleted file mode 100644
index c61678ca140..00000000000
--- a/open-metadata-distribution/open-metadata-packages/open-metadata-client-package/README.md
+++ /dev/null
@@ -1,28 +0,0 @@
-
-
-
-# Open Metadata Client Package
-
-The **open-metadata-client-package** provides Java classes that call the Open Metadata Access Services (OMAS) REST APIs.
-These classes can be used from a Java client program or web application.
-
-Each OMAS provides its own Java client classes.
-There are typically:
-* one Java class for the REST API client and
-* one or more message helper Java classes for supporting event formatting and parsing for the In and Out topics.
-
-The REST API client requires the IP address and port number of the server where the OMASs are deployed.
-
-This package is used by data platforms, engines, tools and applications to
-integrate with an independently deployed open metadata repository
-(or cohort of open metadata repositories).
-
-The server-side package that supports this client
-is **[open-metadata-caller-package](../open-metadata-caller-package/README.md)**.
-
-
-
-----
-License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
-Copyright Contributors to the ODPi Egeria project.
-
\ No newline at end of file
diff --git a/open-metadata-distribution/open-metadata-packages/open-metadata-native-package/README.md b/open-metadata-distribution/open-metadata-packages/open-metadata-native-package/README.md
deleted file mode 100644
index 461de982e7d..00000000000
--- a/open-metadata-distribution/open-metadata-packages/open-metadata-native-package/README.md
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
-# Open Metadata Native Package
-
-The **open-metadata-native-package** provides a library of components to
-build a metadata repository and tools package that natively supports
-the Open Metadata and Governance APIs.
-It includes the open metadata type system,
-plus the Open Metadata Repository Services (OMRS).
-The OMRS includes the capability to join an open metadata repository cohort.
-
-This package supports the development of metadata repositories that
-implement the **[Native Integration Pattern](https://egeria-project.org/concepts/repository-connector/)**.
-
-
-
-
-----
-License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/),
-Copyright Contributors to the ODPi Egeria project.
-
\ No newline at end of file
diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/listeners/AssetLineageOMRSTopicListener.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/listeners/AssetLineageOMRSTopicListener.java
index acfa3e2fa95..71bdd7b3c8a 100644
--- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/listeners/AssetLineageOMRSTopicListener.java
+++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/listeners/AssetLineageOMRSTopicListener.java
@@ -383,7 +383,7 @@ private boolean isProcessStatusChangedToActive(EntityDetail entityDetail, Entity
private void logExceptionToAudit(OMRSInstanceEvent instanceEvent, Exception e) {
String actionDescription = "Asset Lineage OMAS is unable to process an OMRSTopic event.";
- auditLog.logException(actionDescription,
- AssetLineageAuditCode.EVENT_PROCESSING_EXCEPTION.getMessageDefinition(e.getMessage(), serverName, instanceEvent.getInstanceEventType().getName()), instanceEvent.toString(), e);
+ auditLog.logMessage(actionDescription,
+ AssetLineageAuditCode.EVENT_PROCESSING_EXCEPTION.getMessageDefinition(e.getMessage(), serverName, instanceEvent.getInstanceEventType().getName()), instanceEvent.toString());
}
}
\ No newline at end of file
diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageInstanceHandler.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageInstanceHandler.java
index 62010fd8afa..ac078bc4847 100644
--- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageInstanceHandler.java
+++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageInstanceHandler.java
@@ -156,29 +156,4 @@ public AssetLineagePublisher getAssetLineagePublisher(String userId, String serv
return null;
}
-
-
- /**
- * Retrieve the AuditLog from the service instance.
- *
- * @param userId calling userId
- * @param serverName name of the server tied to the request
- * @param serviceOperationName name of the REST API call (typically the top-level methodName)
- * @return
- * @throws org.odpi.openmetadata.commonservices.ffdc.exceptions.InvalidParameterException
- * @throws org.odpi.openmetadata.commonservices.ffdc.exceptions.PropertyServerException
- * @throws org.odpi.openmetadata.commonservices.ffdc.exceptions.UserNotAuthorizedException
- */
- @Override
- public AuditLog getAuditLog(String userId, String serverName, String serviceOperationName)
- throws org.odpi.openmetadata.commonservices.ffdc.exceptions.InvalidParameterException,
- org.odpi.openmetadata.commonservices.ffdc.exceptions.PropertyServerException,
- org.odpi.openmetadata.commonservices.ffdc.exceptions.UserNotAuthorizedException {
-
- AssetLineageServicesInstance instance = (AssetLineageServicesInstance) super.getServerServiceInstance(userId, serverName, serviceOperationName);
- if (instance != null) {
- return instance.getAuditLog();
- }
- return null;
- }
}
diff --git a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageServicesInstance.java b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageServicesInstance.java
index f568d7c7d4c..17c3d44a54f 100644
--- a/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageServicesInstance.java
+++ b/open-metadata-implementation/access-services/asset-lineage/asset-lineage-server/src/main/java/org/odpi/openmetadata/accessservices/assetlineage/server/AssetLineageServicesInstance.java
@@ -135,11 +135,6 @@ public AssetLineagePublisher getAssetLineagePublisher() {
public void setAssetLineagePublisher(AssetLineagePublisher assetLineagePublisher) {
this.assetLineagePublisher = assetLineagePublisher;
}
-
- @Override
- public AuditLog getAuditLog() {
- return super.getAuditLog();
- }
}
diff --git a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataAssetElementsResponse.java b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataAssetElementsResponse.java
index 04055f9bc84..3c5831b5112 100644
--- a/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataAssetElementsResponse.java
+++ b/open-metadata-implementation/access-services/asset-manager/asset-manager-api/src/main/java/org/odpi/openmetadata/accessservices/assetmanager/rest/DataAssetElementsResponse.java
@@ -9,7 +9,6 @@
import org.odpi.openmetadata.accessservices.assetmanager.metadataelements.DataAssetElement;
import java.io.Serial;
-import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
@@ -63,18 +62,7 @@ public DataAssetElementsResponse(DataAssetElementsResponse template)
*/
public List getElementList()
{
- if (elementList == null)
- {
- return null;
- }
- else if (elementList.isEmpty())
- {
- return null;
- }
- else
- {
- return new ArrayList<>(elementList);
- }
+ return elementList;
}
diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementConverter.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementConverter.java
index f0de2a08da0..a506746a11a 100644
--- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementConverter.java
+++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementConverter.java
@@ -5,14 +5,12 @@
import org.odpi.openmetadata.frameworks.connectors.ffdc.PropertyServerException;
import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement;
import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElement;
-import org.odpi.openmetadata.frameworks.governanceaction.search.ElementProperties;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper;
import java.lang.reflect.InvocationTargetException;
-import java.util.Map;
/**
@@ -82,7 +80,7 @@ public B getNewBean(Class beanClass,
super.fillOpenMetadataElement(relatedBean, entity);
- bean.setElementProperties(relatedBean);
+ bean.setElement(relatedBean);
}
return returnBean;
diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementsConverter.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementsConverter.java
index 9c280474203..8f19f8e2605 100644
--- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementsConverter.java
+++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/converters/RelatedElementsConverter.java
@@ -8,6 +8,7 @@
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship;
+import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper;
import java.lang.reflect.InvocationTargetException;
@@ -82,6 +83,12 @@ public B getNewRelationshipBean(Class beanClass,
entityProxy = relationship.getEntityTwoProxy();
bean.setElementGUIDAtEnd2(entityProxy.getGUID());
+
+ if (repositoryHelper.getTypeDefByName(serviceName, relationship.getType().getTypeDefName()) instanceof RelationshipDef relationshipDef)
+ {
+ bean.setLabelAtEnd1(relationshipDef.getEndDef1().getAttributeName());
+ bean.setLabelAtEnd2(relationshipDef.getEndDef2().getAttributeName());
+ }
}
return returnBean;
diff --git a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/outtopic/GovernanceEngineOMRSTopicListener.java b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/outtopic/GovernanceEngineOMRSTopicListener.java
index 877975cceee..78f51fc13ee 100644
--- a/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/outtopic/GovernanceEngineOMRSTopicListener.java
+++ b/open-metadata-implementation/access-services/governance-engine/governance-engine-server/src/main/java/org/odpi/openmetadata/accessservices/governanceengine/outtopic/GovernanceEngineOMRSTopicListener.java
@@ -27,6 +27,7 @@
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntitySummary;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceType;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship;
+import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefSummary;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper;
@@ -440,6 +441,12 @@ private RelatedMetadataElements getRelatedElements(Relationship relationship)
relatedMetadataElements.setElementGUIDAtEnd2(relationship.getEntityTwoProxy().getGUID());
}
+ if (repositoryHelper.getTypeDefByName(serviceName, relationship.getType().getTypeDefName()) instanceof RelationshipDef relationshipDef)
+ {
+ relatedMetadataElements.setLabelAtEnd1(relationshipDef.getEndDef1().getAttributeName());
+ relatedMetadataElements.setLabelAtEnd2(relationshipDef.getEndDef2().getAttributeName());
+ }
+
return relatedMetadataElements;
}
diff --git a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PersonalProfileProperties.java b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PersonalProfileProperties.java
index 218047ef1b5..92fa0ac6860 100644
--- a/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PersonalProfileProperties.java
+++ b/open-metadata-implementation/access-services/governance-program/governance-program-api/src/main/java/org/odpi/openmetadata/accessservices/governanceprogram/properties/PersonalProfileProperties.java
@@ -14,7 +14,7 @@
/**
* The PersonalProfileProperties describes an individual. Information about the
- * personal profile is stored as an Person entity in the metadata repository.
+ * personal profile is stored as a Person entity in the metadata repository.
*/
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@@ -23,8 +23,19 @@ public class PersonalProfileProperties extends ActorProfileProperties
{
private static final long serialVersionUID = 1L;
- private String fullName = null;
- private String jobTitle = null;
+ private String title = null;
+ private String initials = null;
+ private String givenNames = null;
+ private String surname = null;
+ private String fullName = null;
+ private String pronouns = null;
+ private String jobTitle = null;
+ private String employeeNumber = null;
+ private String employeeType = null;
+ private String preferredLanguage = null;
+ private String residentCountry = null;
+ private String timeZone = null;
+ private boolean isPublic = true;
/**
@@ -47,12 +58,111 @@ public PersonalProfileProperties(PersonalProfileProperties template)
if (template != null)
{
+ this.title = template.getTitle();
+ this.initials = template.getInitials();
+ this.givenNames = template.getGivenNames();
+ this.surname = template.getSurname();
this.fullName = template.getFullName();
+ this.pronouns = template.getPronouns();
this.jobTitle = template.getJobTitle();
+ this.employeeNumber = template.getEmployeeNumber();
+ this.employeeType = template.getEmployeeType();
+ this.preferredLanguage = template.getPreferredLanguage();
+ this.residentCountry = template.getResidentCountry();
+ this.timeZone = template.getTimeZone();
+ this.isPublic = template.getIsPublic();
}
}
+ /**
+ * Return the courtesy title.
+ *
+ * @return string
+ */
+ public String getTitle()
+ {
+ return title;
+ }
+
+
+ /**
+ * Set up the courtesy title.
+ *
+ * @param title string
+ */
+ public void setTitle(String title)
+ {
+ this.title = title;
+ }
+
+
+ /**
+ * Return the person's initials (first letter of each given name).
+ *
+ * @return string
+ */
+ public String getInitials()
+ {
+ return initials;
+ }
+
+
+ /**
+ * Set up the person's initials (first letter of each given name).
+ *
+ * @param initials string
+ */
+ public void setInitials(String initials)
+ {
+ this.initials = initials;
+ }
+
+
+ /**
+ * Return the list of given names.
+ *
+ * @return string
+ */
+ public String getGivenNames()
+ {
+ return givenNames;
+ }
+
+
+ /**
+ * Set up the list of given names.
+ *
+ * @param givenNames string
+ */
+ public void setGivenNames(String givenNames)
+ {
+ this.givenNames = givenNames;
+ }
+
+
+ /**
+ * Return the last, or family name of the person.
+ *
+ * @return string
+ */
+ public String getSurname()
+ {
+ return surname;
+ }
+
+
+ /**
+ * Set up the last, or family name of the person.
+ *
+ * @param surname string
+ */
+ public void setSurname(String surname)
+ {
+ this.surname = surname;
+ }
+
+
/**
* Return the full legal name for this person.
*
@@ -75,6 +185,28 @@ public void setFullName(String fullName)
}
+ /**
+ * Return the person's pronouns preference.
+ *
+ * @return string
+ */
+ public String getPronouns()
+ {
+ return pronouns;
+ }
+
+
+ /**
+ * Set up the person's pronouns preference.
+ *
+ * @param pronouns string
+ */
+ public void setPronouns(String pronouns)
+ {
+ this.pronouns = pronouns;
+ }
+
+
/**
* Return the primary job title for this person.
*
@@ -97,6 +229,138 @@ public void setJobTitle(String jobTitle)
}
+ /**
+ * Return the person's employee number (aka personnel number, serial number).
+ *
+ * @return string
+ */
+ public String getEmployeeNumber()
+ {
+ return employeeNumber;
+ }
+
+
+ /**
+ * Set up the person's employee number (aka personnel number, serial number).
+ *
+ * @param employeeNumber string
+ */
+ public void setEmployeeNumber(String employeeNumber)
+ {
+ this.employeeNumber = employeeNumber;
+ }
+
+
+ /**
+ * Return the type of employee contract such as full-time, part-time, that the person holds.
+ *
+ * @return string
+ */
+ public String getEmployeeType()
+ {
+ return employeeType;
+ }
+
+
+ /**
+ * Set up the type of employee contract such as full-time, part-time, that the person holds.
+ *
+ * @param employeeType string
+ */
+ public void setEmployeeType(String employeeType)
+ {
+ this.employeeType = employeeType;
+ }
+
+
+ /**
+ * Return the person's preferred speaking/written language for communicating with them.
+ *
+ * @return string
+ */
+ public String getPreferredLanguage()
+ {
+ return preferredLanguage;
+ }
+
+
+ /**
+ * Set up the person's preferred speaking/written language for communicating with them.
+ *
+ * @param preferredLanguage string
+ */
+ public void setPreferredLanguage(String preferredLanguage)
+ {
+ this.preferredLanguage = preferredLanguage;
+ }
+
+
+ /**
+ * Return the name of the country that is the person's primary residence.
+ *
+ * @return string
+ */
+ public String getResidentCountry()
+ {
+ return residentCountry;
+ }
+
+
+ /**
+ * Set up the name of the country that is the person's primary residence.
+ *
+ * @param residentCountry string
+ */
+ public void setResidentCountry(String residentCountry)
+ {
+ this.residentCountry = residentCountry;
+ }
+
+
+ /**
+ * Return the time zone that the person is located in.
+ *
+ * @return string
+ */
+ public String getTimeZone()
+ {
+ return timeZone;
+ }
+
+
+ /**
+ * Set up the time zone that the person is located in.
+ *
+ * @param timeZone string
+ */
+ public void setTimeZone(String timeZone)
+ {
+ this.timeZone = timeZone;
+ }
+
+
+ /**
+ * Return the flag to indicate whether the profile is public or not.
+ *
+ * @return boolean flag
+ */
+ public boolean getIsPublic()
+ {
+ return isPublic;
+ }
+
+
+ /**
+ * Set up the flag to indicate whether the profile is public or not.
+ *
+ * @param aPublic boolean flag
+ */
+ public void setIsPublic(boolean aPublic)
+ {
+ isPublic = aPublic;
+ }
+
+
/**
* JSON-style toString.
*
@@ -106,12 +370,25 @@ public void setJobTitle(String jobTitle)
public String toString()
{
return "PersonalProfileProperties{" +
- "knownName='" + getKnownName() + '\'' +
+ "title='" + title + '\'' +
+ ", initials='" + initials + '\'' +
+ ", givenName='" + givenNames + '\'' +
+ ", surname='" + surname + '\'' +
", fullName='" + fullName + '\'' +
+ ", pronouns='" + pronouns + '\'' +
", jobTitle='" + jobTitle + '\'' +
+ ", employeeNumber='" + employeeNumber + '\'' +
+ ", employeeType='" + employeeType + '\'' +
+ ", preferredLanguage='" + preferredLanguage + '\'' +
+ ", residentCountry='" + residentCountry + '\'' +
+ ", timeZone='" + timeZone + '\'' +
+ ", isPublic=" + isPublic +
+ ", knownName='" + getKnownName() + '\'' +
", description='" + getDescription() + '\'' +
", qualifiedName='" + getQualifiedName() + '\'' +
", additionalProperties=" + getAdditionalProperties() +
+ ", effectiveFrom=" + getEffectiveFrom() +
+ ", effectiveTo=" + getEffectiveTo() +
", typeName='" + getTypeName() + '\'' +
", extendedProperties=" + getExtendedProperties() +
'}';
@@ -131,17 +408,27 @@ public boolean equals(Object objectToCompare)
{
return true;
}
- if (objectToCompare == null || getClass() != objectToCompare.getClass())
+ if (! (objectToCompare instanceof PersonalProfileProperties that))
{
return false;
}
- if (!super.equals(objectToCompare))
+ if (! super.equals(objectToCompare))
{
return false;
}
- PersonalProfileProperties that = (PersonalProfileProperties) objectToCompare;
- return Objects.equals(fullName, that.fullName) &&
- Objects.equals(jobTitle, that.jobTitle);
+ return isPublic == that.isPublic &&
+ Objects.equals(title, that.title) &&
+ Objects.equals(initials, that.initials) &&
+ Objects.equals(givenNames, that.givenNames) &&
+ Objects.equals(surname, that.surname) &&
+ Objects.equals(fullName, that.fullName) &&
+ Objects.equals(pronouns, that.pronouns) &&
+ Objects.equals(jobTitle, that.jobTitle) &&
+ Objects.equals(employeeNumber, that.employeeNumber) &&
+ Objects.equals(employeeType, that.employeeType) &&
+ Objects.equals(preferredLanguage, that.preferredLanguage) &&
+ Objects.equals(residentCountry, that.residentCountry) &&
+ Objects.equals(timeZone, that.timeZone);
}
@@ -153,6 +440,7 @@ public boolean equals(Object objectToCompare)
@Override
public int hashCode()
{
- return Objects.hash(super.hashCode(), fullName, jobTitle);
+ return Objects.hash(super.hashCode(), title, initials, givenNames, surname, fullName, pronouns, jobTitle, employeeNumber, employeeType,
+ preferredLanguage, residentCountry, timeZone, isPublic);
}
}
diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/build.gradle
index 75c412857dc..0657fb54d4c 100644
--- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/build.gradle
+++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/build.gradle
@@ -12,5 +12,10 @@ dependencies {
compileOnly 'com.fasterxml.jackson.core:jackson-annotations'
compileOnly project(':open-metadata-implementation:frameworks:audit-log-framework')
compileOnly project(':open-metadata-implementation:frameworks:open-connector-framework')
+ compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis')
+ testImplementation project(':open-metadata-implementation:frameworks:audit-log-framework')
+ testImplementation project(':open-metadata-implementation:repository-services:repository-services-apis')
+ testImplementation project(':open-metadata-test:open-metadata-ut')
+ testImplementation 'org.testng:testng'
}
diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/JDBCResourceConnector.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/JDBCResourceConnector.java
index 8f7c4d52788..2c47af6e625 100644
--- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/JDBCResourceConnector.java
+++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/JDBCResourceConnector.java
@@ -3,77 +3,689 @@
package org.odpi.openmetadata.adapters.connectors.resource.jdbc;
+import org.odpi.openmetadata.adapters.connectors.resource.jdbc.ffdc.JDBCAuditCode;
+import org.odpi.openmetadata.adapters.connectors.resource.jdbc.ffdc.JDBCErrorCode;
+import org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties.JDBCDataValue;
+import org.odpi.openmetadata.frameworks.auditlog.AuditLog;
+import org.odpi.openmetadata.frameworks.auditlog.AuditLoggingComponent;
+import org.odpi.openmetadata.frameworks.auditlog.ComponentDescription;
+import org.odpi.openmetadata.frameworks.connectors.Connector;
import org.odpi.openmetadata.frameworks.connectors.ConnectorBase;
+import org.odpi.openmetadata.frameworks.connectors.VirtualConnectorExtension;
+import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException;
+import org.odpi.openmetadata.frameworks.connectors.properties.EndpointProperties;
import javax.sql.DataSource;
import java.io.PrintWriter;
import java.sql.Connection;
import java.sql.DriverManager;
+import java.sql.PreparedStatement;
+import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.SQLFeatureNotSupportedException;
+import java.sql.Types;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
/**
* JDBCResourceConnector provides basic implementation of {@link DataSource} interface in order to get a {@link Connection} to
* target database. This is done via a static inner class, since {@link DataSource#getConnection()} clashes with
- * {@link ConnectorBase#getConnection()}
+ * {@link ConnectorBase#getConnection()}.
+ *
+ * The DataSource can be used directly. There are also selected methods to issue common SQL statements to the database.
*/
-public class JDBCResourceConnector extends ConnectorBase {
+public class JDBCResourceConnector extends ConnectorBase implements AuditLoggingComponent,
+ VirtualConnectorExtension
+{
+ private AuditLog auditLog = null;
+ private String jdbcDatabaseName = null;
+ private String jdbcDatabaseURL = null;
+ private List embeddedConnectors = null;
+
+ private final List knownDataSources = new ArrayList<>();
+
/**
- * Get as {@link DataSource}
+ * Receive an audit log object that can be used to record audit log messages. The caller has initialized it
+ * with the correct component description and log destinations.
*
- * @return implementation
+ * @param auditLog audit log object
*/
- public DataSource asDataSource(){
- return new JdbcConnectorAsDataSource();
+ @Override
+ public void setAuditLog(AuditLog auditLog)
+ {
+ this.auditLog = auditLog;
}
- private class JdbcConnectorAsDataSource implements DataSource {
- @Override
- public Connection getConnection() throws SQLException {
- return DriverManager.getConnection(connectionBean.getEndpoint().getAddress(), connectionBean.getUserId(),
- connectionBean.getClearPassword());
+ /**
+ * Return the component description that is used by this connector in the audit log.
+ *
+ * @return id, name, description, wiki page URL.
+ */
+ @Override
+ public ComponentDescription getConnectorComponentDescription()
+ {
+ if ((this.auditLog != null) && (this.auditLog.getReport() != null))
+ {
+ return auditLog.getReport().getReportingComponent();
}
- @Override
- public Connection getConnection(String username, String password) throws SQLException {
- return DriverManager.getConnection(connectionBean.getEndpoint().getAddress(), username, password);
+ return null;
+ }
+
+
+ /**
+ * Set up the list of connectors that this virtual connector will use to support its interface.
+ * The connectors are initialized waiting to start. When start() is called on the
+ * virtual connector, it needs to pass start() to each of the embedded connectors. Similarly for
+ * disconnect().
+ *
+ * @param embeddedConnectors list of connectors
+ */
+ @Override
+ public void initializeEmbeddedConnectors(List embeddedConnectors)
+ {
+ this.embeddedConnectors = embeddedConnectors;
+ }
+
+
+ /**
+ * Indicates that the connector is completely configured and can begin processing.
+ *
+ * @throws ConnectorCheckedException there is a problem within the connector.
+ */
+ @Override
+ public synchronized void start() throws ConnectorCheckedException
+ {
+ super.start();
+
+ final String methodName = "start";
+
+ /*
+ * Retrieve the connection string
+ */
+ EndpointProperties endpoint = connectionProperties.getEndpoint();
+
+ if (endpoint != null)
+ {
+ jdbcDatabaseURL = endpoint.getAddress();
+ }
+
+ if (jdbcDatabaseURL == null)
+ {
+ throw new ConnectorCheckedException(JDBCErrorCode.NULL_URL.getMessageDefinition(connectionProperties.getConnectionName()),
+ this.getClass().getName(),
+ methodName);
+ }
+
+ Map configurationProperties = connectionProperties.getConfigurationProperties();
+
+ if (configurationProperties != null)
+ {
+ if (configurationProperties.get(JDBCResourceConnectorProvider.JDBC_DATABASE_NAME) != null)
+ {
+ jdbcDatabaseName = configurationProperties.get(JDBCResourceConnectorProvider.JDBC_DATABASE_NAME).toString();
+ }
+ }
+
+ /*
+ * Default the database name to the connection URL if an alternative name is not supplied.
+ */
+ if (jdbcDatabaseName == null)
+ {
+ jdbcDatabaseName = jdbcDatabaseURL;
+ }
+
+ if (configurationProperties != null)
+ {
+ if (configurationProperties.get(JDBCResourceConnectorProvider.JDBC_CONNECTION_TIMEOUT) != null)
+ {
+ Object connectionTimeoutOption = configurationProperties.get(JDBCResourceConnectorProvider.JDBC_CONNECTION_TIMEOUT);
+
+ if (connectionTimeoutOption != null)
+ {
+ int connectionTimeout = Integer.parseInt(connectionTimeoutOption.toString());
+
+ /*
+ * Note that this is a class level property and will affect all connectors running in this class loader.
+ */
+ DriverManager.setLoginTimeout(connectionTimeout);
+ }
+ }
+
+ Object driverManagerClassName = configurationProperties.get(JDBCResourceConnectorProvider.JDBC_DRIVER_MANAGER_CLASS_NAME);
+
+ if (driverManagerClassName != null)
+ {
+ try
+ {
+ Class.forName(driverManagerClassName.toString());
+ }
+ catch (ClassNotFoundException error)
+ {
+ throw new ConnectorCheckedException(JDBCErrorCode.BAD_DRIVER_MANAGER_CLASS.getMessageDefinition(jdbcDatabaseName,
+ driverManagerClassName.toString(),
+ connectionProperties.getConnectionName(),
+ error.getMessage()),
+ this.getClass().getName(),
+ methodName);
+ }
+ }
+ }
+ }
+
+
+ /**
+ * Return the DataSource implementation for this database. This supports creating the connection to the database.
+ *
+ * @return DataSource
+ */
+ public DataSource getDataSource()
+ {
+ JDBCConnectorAsDataSource dataSource = new JDBCConnectorAsDataSource(jdbcDatabaseName, auditLog);
+
+ this.knownDataSources.add(dataSource);
+
+ return dataSource;
+ }
+
+
+ /**
+ * Retrieve the row with the requested identifier and with the latest timestamp.
+ *
+ * @param jdbcConnection connection to the database
+ * @param tableName name of the table to query
+ * @param identifierColumnName name of the column with the identifier in it
+ * @param identifierColumnValue value of the identifier to match on
+ * @param timestampColumnName name of the column with the timestamp
+ * @param columnNameTypeMap map of resulting column names and values to include in the results
+ * @return Map of column names to data values that represent the requested row
+ * @throws SQLException there was a problem calling the database
+ */
+ public Map getLatestRow(Connection jdbcConnection,
+ String tableName,
+ String identifierColumnName,
+ String identifierColumnValue,
+ String timestampColumnName,
+ Map columnNameTypeMap) throws SQLException
+ {
+ String sqlCommand = "SELECT * FROM " +
+ tableName +
+ " WHERE " + identifierColumnName + " = ? AND " +
+ timestampColumnName +
+ " = (SELECT MAX(" + timestampColumnName + ") FROM " + tableName + " WHERE " + identifierColumnName + " = ?)";
+
+ PreparedStatement preparedStatement = jdbcConnection.prepareStatement(sqlCommand);
+
+ preparedStatement.setString(1, identifierColumnValue);
+ preparedStatement.setString(2, identifierColumnValue);
+
+ ResultSet resultSet = preparedStatement.executeQuery();
+ Map results = null;
+
+ /*
+ * The query should have returned 0 or one rows
+ */
+ if (resultSet.next())
+ {
+ results = new HashMap<>();
+
+ for (String columnName : columnNameTypeMap.keySet())
+ {
+ JDBCDataValue dataValue = null;
+ int sqlType = columnNameTypeMap.get(columnName);
+ switch (sqlType)
+ {
+ case Types.VARCHAR -> dataValue = new JDBCDataValue(resultSet.getString(columnName), sqlType);
+ case Types.ARRAY -> dataValue = new JDBCDataValue(resultSet.getArray(columnName), sqlType);
+ case Types.BOOLEAN -> dataValue = new JDBCDataValue(resultSet.getBoolean(columnName), sqlType);
+ case Types.DATE -> dataValue = new JDBCDataValue(resultSet.getDate(columnName), sqlType);
+ case Types.INTEGER -> dataValue = new JDBCDataValue(resultSet.getInt(columnName), sqlType);
+ case Types.TIMESTAMP -> dataValue = new JDBCDataValue(resultSet.getTimestamp(columnName), sqlType);
+ }
+
+ if ((dataValue != null) && (dataValue.getDataValue() != null))
+ {
+ results.put(columnName, dataValue);
+ }
+ }
+ }
+
+ resultSet.close();
+ preparedStatement.close();
+
+ return results;
+ }
+
+
+ /**
+ * Prepare an INSERT SQL statement with all the columns for the new row filled out.
+ *
+ * @param jdbcConnection connection to send the request
+ * @param tableName name of the table where the row is to be added
+ * @param columnNameValueMap column names, values and types
+ * @throws SQLException problem executing the command
+ */
+ public void insertRowIntoTable(Connection jdbcConnection,
+ String tableName,
+ Map columnNameValueMap) throws SQLException
+ {
+ final String methodName = "insertRowIntoTable";
+
+ String sqlCommand = "INSERT INTO " + tableName + this.getInsertColumnList(columnNameValueMap) + " ON CONFLICT DO NOTHING";
+
+ PreparedStatement preparedStatement = jdbcConnection.prepareStatement(sqlCommand);
+
+ int parameterIndex = 1;
+ for (String columnName : columnNameValueMap.keySet())
+ {
+ JDBCDataValue jdbcDataValue = columnNameValueMap.get(columnName);
+
+ if (jdbcDataValue.getScaleOrLength() == 0)
+ {
+ preparedStatement.setObject(parameterIndex,
+ jdbcDataValue.getDataValue(),
+ jdbcDataValue.getTargetSQLType());
+ }
+ else
+ {
+ preparedStatement.setObject(parameterIndex,
+ jdbcDataValue.getDataValue(),
+ jdbcDataValue.getTargetSQLType(),
+ jdbcDataValue.getScaleOrLength());
+ }
+
+ parameterIndex++;
+ }
+
+ int rowsInserted = preparedStatement.executeUpdate();
+
+ if ((rowsInserted > 1) && (auditLog != null))
+ {
+ auditLog.logMessage(methodName,
+ JDBCAuditCode.UNEXPECTED_ROW_COUNT_FROM_DATABASE.getMessageDefinition(jdbcDatabaseName,
+ Integer.toString(rowsInserted),
+ sqlCommand));
+ }
+
+ preparedStatement.close();
+ }
+
+
+ /**
+ * Return the part of the SQL INSERT command that includes the column names
+ *
+ * @param columnNameValueMap column names, values and types
+ * @return part of the SQL INSERT statement
+ */
+ private String getInsertColumnList(Map columnNameValueMap)
+ {
+ return " (" + getColumnNames(columnNameValueMap) + ") values (" + getPlaceholders(columnNameValueMap.size()) + ")";
+ }
+
+
+ /**
+ * Return a comma separated list of column names
+ *
+ * @param columnNameValueMap column names, values and types
+ * @return list
+ */
+ private String getColumnNames(Map columnNameValueMap)
+ {
+ StringBuilder sqlFragment = new StringBuilder();
+ boolean firstColumn = true;
+
+ for (String columnName : columnNameValueMap.keySet())
+ {
+ if (! firstColumn)
+ {
+ sqlFragment.append(", ");
+ }
+ else
+ {
+ firstColumn = false;
+ }
+
+ sqlFragment.append(columnName);
+ }
+
+ return sqlFragment.toString();
+ }
+
+
+ /**
+ * Return the list of comma separated question marks that are the placeholders for the SQL INSERT command.
+ *
+ * @param numberOfColumns number of columns in the table
+ * @return list of common separated question marks
+ */
+ private String getPlaceholders(int numberOfColumns)
+ {
+ StringBuilder sqlFragment = new StringBuilder();
+
+ for (int i=0; i knownConnections = new ArrayList<>();
+
+
+ /**
+ * Construct the data source wrapper.
+ *
+ * @param databaseName database name to use in messages
+ * @param auditLog logging destination
+ */
+ JDBCConnectorAsDataSource(String databaseName,
+ AuditLog auditLog)
+ {
+ this.databaseName = databaseName;
+ this.auditLog = auditLog;
+ }
+
+
+ /**
+ * Attempts to establish a connection with the data source that this DataSource object represents.
+ *
+ * @return a connection to the data source
+ * @throws SQLException if a database access error occurs
+ */
@Override
- public PrintWriter getLogWriter() throws SQLException {
- return null;
+ public Connection getConnection() throws SQLException
+ {
+ final String methodName = "dataSource.getConnection";
+
+ try
+ {
+ Connection jdbcConnection;
+
+ if ((connectionProperties.getUserId() == null) || (connectionProperties.getClearPassword() == null))
+ {
+ jdbcConnection = DriverManager.getConnection(connectionProperties.getEndpoint().getAddress());
+ }
+ else
+ {
+ jdbcConnection = DriverManager.getConnection(connectionProperties.getEndpoint().getAddress(),
+ connectionBean.getUserId(),
+ connectionBean.getClearPassword());
+ }
+
+ if (jdbcConnection != null)
+ {
+ this.knownConnections.add(jdbcConnection);
+ }
+
+ if (auditLog != null)
+ {
+ auditLog.logMessage(methodName, JDBCAuditCode.CONNECTOR_CONNECTED_TO_DATABASE.getMessageDefinition(databaseName));
+ }
+
+ return jdbcConnection;
+ }
+ catch (SQLException error)
+ {
+ if (auditLog != null)
+ {
+ auditLog.logException(methodName,
+ JDBCAuditCode.UNEXPECTED_EXCEPTION.getMessageDefinition(databaseName,
+ error.getClass().getName(),
+ methodName,
+ error.getMessage()),
+ error);
+ }
+
+ throw error;
+ }
}
+
+ /**
+ * Attempts to establish a connection with the data source that this DataSource object represents.
+ *
+ * @param username the username for connecting to the database that overrides the configured userId
+ * @param password the password for connecting to the database that overrides the configured clearPassword
+ * @return a connection to the data source
+ * @throws SQLException if a database access error occurs
+ */
@Override
- public void setLogWriter(PrintWriter out) throws SQLException {
+ public Connection getConnection(String username, String password) throws SQLException
+ {
+ final String methodName = "dataSource.getConnection(supplied security)";
+
+ try
+ {
+ Connection jdbcConnection = DriverManager.getConnection(connectionBean.getEndpoint().getAddress(), username, password);
+ if (auditLog != null)
+ {
+ auditLog.logMessage(methodName, JDBCAuditCode.CONNECTOR_CONNECTED_TO_DATABASE.getMessageDefinition(databaseName));
+ }
+
+ return jdbcConnection;
+ }
+ catch (SQLException error)
+ {
+ if (auditLog != null)
+ {
+ auditLog.logException(methodName,
+ JDBCAuditCode.UNEXPECTED_EXCEPTION.getMessageDefinition(databaseName,
+ error.getClass().getName(),
+ methodName,
+ error.getMessage()),
+ error);
+ }
+
+ throw error;
+ }
}
+
+ /**
+ * Retrieves the log writer for this DataSource object.
+ * The log writer is a character output stream to which all logging and tracing messages for this data source will be printed.
+ * This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object,
+ * and so on. Messages printed to a data source specific log writer are not printed to the log writer associated with the
+ * java.sql.DriverManager class. When a DataSource object is created, the log writer is initially null; in other words,
+ * the default is for logging to be disabled.
+ *
+ * @return log writer
+ * @throws SQLException if a database access error occurs
+ */
@Override
- public void setLoginTimeout(int seconds) throws SQLException {
+ public PrintWriter getLogWriter() throws SQLException
+ {
+ return DriverManager.getLogWriter();
+ }
+
+ /**
+ * Sets the log writer for this DataSource object to the given java.io.PrintWriter object.
+ * The log writer is a character output stream to which all logging and tracing messages for this data source will be printed.
+ * This includes messages printed by the methods of this object, messages printed by methods of other objects manufactured by this object,
+ * and so on. Messages printed to a data source - specific log writer are not printed to the log writer associated with the
+ * java.sql.DriverManager class. When a DataSource object is created the log writer is initially null; in other words,
+ * the default is for logging to be disabled
+ *
+ * @param out the new log writer; to disable logging, set to null
+ * @throws SQLException if a database access error occurs
+ */
+ @Override
+ public void setLogWriter(PrintWriter out) throws SQLException
+ {
+ DriverManager.setLogWriter(out);
}
+
+ /**
+ * Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.
+ * A value of zero specifies that the timeout is the default system timeout if there is one; otherwise, it specifies that there is no timeout.
+ * When a DataSource object is created, the login timeout is initially zero.
+ *
+ * @param seconds the data source login time limit
+ * @throws SQLException if a database access error occurs
+ */
@Override
- public int getLoginTimeout() throws SQLException {
- return 0;
+ public void setLoginTimeout(int seconds) throws SQLException
+ {
+ DriverManager.setLoginTimeout(seconds);
}
+
+ /**
+ * Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.
+ * A value of zero means that the timeout is the default system timeout if there is one; otherwise, it means that there is no timeout.
+ * When a DataSource object is created, the login timeout is initially zero.
+ *
+ * @return seconds
+ * @throws SQLException if a database access error occurs
+ */
@Override
- public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException {
- return null;
+ public int getLoginTimeout() throws SQLException
+ {
+ return DriverManager.getLoginTimeout();
+ }
+
+
+ /**
+ * Return the parent Logger of all the Loggers used by this data source. This should be the Logger farthest from the root Logger
+ * that is still an ancestor of all the Loggers used by this data source. Configuring this Logger will affect all the
+ * log messages generated by the data source. In the worst case, this may be the root Logger.
+ *
+ * @return the parent Logger for this data source
+ * @throws SQLFeatureNotSupportedException – if the data source does not use java.util.logging
+ */
+ @Override
+ public java.util.logging.Logger getParentLogger() throws SQLFeatureNotSupportedException
+ {
+ throw new SQLFeatureNotSupportedException();
}
+
+ /**
+ * Returns an object that implements the given interface to allow access to non-standard methods, or standard methods not exposed by
+ * the proxy. If the receiver implements the interface then the result is the receiver or a proxy for the receiver.
+ * If the receiver is a wrapper and the wrapped object implements the interface then the result is the wrapped object or a proxy for the
+ * wrapped object. Otherwise, return the result of calling unwrap recursively on the wrapped object or a proxy for that result.
+ * If the receiver is not a wrapper and does not implement the interface, then an SQLException is thrown.
+ *
+ * @param requestedInterface A Class defining an interface that the result must implement.
+ * @return an object that implements the interface. Maybe a proxy for the actual implementing object.
+ * @param class
+ * @throws SQLException If no object found that implements the interface
+ */
@Override
- public T unwrap(Class iface) throws SQLException {
+ public T unwrap(Class requestedInterface) throws SQLException
+ {
return null;
}
+
+ /**
+ * Returns true if this either implements the interface argument or is directly or indirectly a wrapper for an object that does.
+ * Returns false otherwise. If this implements the interface then return true, else if this is a wrapper then return the result of
+ * recursively calling isWrapperFor on the wrapped object. If this does not implement the interface and is not a wrapper,
+ * return false. This method should be implemented as a low-cost operation compared to unwrap so that callers can use this method to avoid
+ * expensive unwrap calls that may fail. If this method returns true then calling unwrap with the same argument should succeed.
+ *
+ * @param requestedInterface a Class defining an interface.
+ * @return true if this implements the interface or directly or indirectly wraps an object that does
+ * @throws SQLException if an error occurs while determining whether this is a wrapper for an object with the given interface.
+ */
@Override
- public boolean isWrapperFor(Class> iface) throws SQLException {
+ public boolean isWrapperFor(Class> requestedInterface) throws SQLException
+ {
return false;
}
+
+
+ /**
+ * Free up any connections held since the data source is no longer needed.
+ */
+ public void disconnect()
+ {
+ final String methodName = "disconnect";
+
+ if (auditLog != null)
+ {
+ String numberOfConnections = "zero";
+
+ if (! knownConnections.isEmpty())
+ {
+ numberOfConnections = Integer.toString(knownConnections.size());
+ }
+
+ auditLog.logMessage(methodName, JDBCAuditCode.CONNECTOR_STOPPING.getMessageDefinition(jdbcDatabaseName, numberOfConnections));
+ }
+
+ for (Connection connection : this.knownConnections)
+ {
+ try
+ {
+ if (! connection.isClosed())
+ {
+ connection.close();
+ }
+ }
+ catch (Exception error)
+ {
+ // Ignore error - in shutdown and the connection may be in error already.
+ }
+ }
+ }
}
}
diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/JDBCResourceConnectorProvider.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/JDBCResourceConnectorProvider.java
index 0fd7d23a6b0..c405ce4fa39 100644
--- a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/JDBCResourceConnectorProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/JDBCResourceConnectorProvider.java
@@ -3,43 +3,110 @@
package org.odpi.openmetadata.adapters.connectors.resource.jdbc;
+import org.odpi.openmetadata.frameworks.auditlog.AuditLogReportingComponent;
import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType;
import javax.sql.DataSource;
+import java.util.ArrayList;
+import java.util.List;
/**
* JDBCResourceConnectorProvider is the OCF connector provider for the jdbc resource connector.
*/
public class JDBCResourceConnectorProvider extends ConnectorProviderBase
{
- static final String connectorTypeGUID = "64463b01-92f6-4d7b-9737-f1d20b2654f4";
- static final String connectorQualifiedName = "Egeria::RelationalDbConnectors::Jdbc";
- static final String connectorDisplayName = "Relational Database JDBC Connector";
- static final String connectorTypeDescription = "Connector supports reading of metadata from relational databases using exclusively the JDBC API";
+ /*
+ * Unique identifier of the connector for the audit log.
+ */
+ private static final int connectorComponentId = 660;
+
+ /*
+ * Unique identifier for the connector type.
+ */
+ private static final String connectorTypeGUID = "64463b01-92f6-4d7b-9737-f1d20b2654f4";
+ private static final String connectorQualifiedName = "Egeria:ResourceConnector:RelationalDatabase:JDBC";
+ private static final String connectorDisplayName = "Relational Database JDBC Connector";
+ private static final String connectorTypeDescription = "Connector supports access to relational databases using exclusively the JDBC API. This includes both data and metadata.";
+ private static final String connectorWikiPage = "https://egeria-project.org/connectors/resource/jdbc-resource-connector/";
+
+ /*
+ * The type name of the asset that this connector supports.
+ */
+ private static final String assetTypeName = "RelationalDatabase";
+
+ /**
+ * An optional configuration property that causes the named class to be loaded and registered as a driver.
+ * This property only needs to be defined if the connector is experiencing exceptions related to a missing DriverManager class for
+ * the database URL.
+ */
+ public static final String JDBC_DRIVER_MANAGER_CLASS_NAME = "jdbcDriverManagerClassName";
+
+ /**
+ * Sets the maximum time in seconds that this data source will wait while attempting to connect to a database.
+ * The default value is 0 which means use the system default timeout, if any; otherwise it means no timeout.
+ */
+ public static final String JDBC_CONNECTION_TIMEOUT = "jdbcConnectionTimeout";
+
+ /**
+ * Provides a name to use in messages about the database. If it is not set then the connection URL string is used.
+ */
+ public static final String JDBC_DATABASE_NAME = "jdbcDatabaseName";
- private static final String assetTypeName = "Database";
+
+ /*
+ * Class of the connector.
+ */
+ private static final Class> connectorClass = JDBCResourceConnector.class;
/**
- * Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific
- * registry store implementation.
+ * Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific connector implementation.
+ * Most of the work of this connector provider is handled by the base class.
*/
- public JDBCResourceConnectorProvider() {
+ public JDBCResourceConnectorProvider()
+ {
super();
- super.setConnectorClassName(JDBCResourceConnector.class.getName());
+ /*
+ * Set up the class name of the connector that this provider creates.
+ */
+ super.setConnectorClassName(connectorClass.getName());
+
+ /*
+ * Set up the connector type that should be included in a connection used to configure this connector.
+ */
ConnectorType connectorType = new ConnectorType();
connectorType.setType(ConnectorType.getConnectorTypeType());
connectorType.setGUID(connectorTypeGUID);
connectorType.setQualifiedName(connectorQualifiedName);
connectorType.setDisplayName(connectorDisplayName);
connectorType.setDescription(connectorTypeDescription);
- connectorType.setSupportedAssetTypeName(assetTypeName);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ List recognizedConfigurationProperties = new ArrayList<>();
+ recognizedConfigurationProperties.add(JDBC_DRIVER_MANAGER_CLASS_NAME);
+ recognizedConfigurationProperties.add(JDBC_CONNECTION_TIMEOUT);
+ recognizedConfigurationProperties.add(JDBC_DATABASE_NAME);
+ connectorType.setRecognizedConfigurationProperties(recognizedConfigurationProperties);
+ /*
+ * Information about the type of assets this type of connector works with and the interface it supports.
+ */
+ connectorType.setSupportedAssetTypeName(assetTypeName);
connectorInterfaces.add(DataSource.class.getName());
connectorType.setConnectorInterfaces(connectorInterfaces);
super.connectorTypeBean = connectorType;
+
+ /*
+ * Set up the component description used in the connector's audit log messages.
+ */
+ AuditLogReportingComponent componentDescription = new AuditLogReportingComponent();
+
+ componentDescription.setComponentId(connectorComponentId);
+ componentDescription.setComponentName(connectorQualifiedName);
+ componentDescription.setComponentDescription(connectorTypeDescription);
+ componentDescription.setComponentWikiURL(connectorWikiPage);
+
+ super.setConnectorComponentDescription(componentDescription);
}
}
diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/JDBCAuditCode.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/JDBCAuditCode.java
new file mode 100644
index 00000000000..dac365a4b45
--- /dev/null
+++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/JDBCAuditCode.java
@@ -0,0 +1,150 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Copyright Contributors to the ODPi Egeria project. */
+package org.odpi.openmetadata.adapters.connectors.resource.jdbc.ffdc;
+
+import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageDefinition;
+import org.odpi.openmetadata.frameworks.auditlog.messagesets.AuditLogMessageSet;
+import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity;
+
+
+/**
+ * The JDBCAuditCode is used to define the message content for the OMRS Audit Log.
+ * The 5 fields in the enum are:
+ *
+ * - Log Message Identifier - to uniquely identify the message
+ * - Severity - is this an event, decision, action, error or exception
+ * - Log Message Text - includes placeholder to allow additional values to be captured
+ * - Additional Information - further parameters and data relating to the audit message (optional)
+ * - SystemAction - describes the result of the situation
+ * - UserAction - describes how a user should correct the situation
+ *
+ */
+public enum JDBCAuditCode implements AuditLogMessageSet
+{
+ /**
+ * JDBC-RESOURCE-CONNECTOR-0001 - The JDBC resource connector received an unexpected exception {0} during method {1}; the error message was: {2}
+ */
+ UNEXPECTED_EXCEPTION("JDBC-RESOURCE-CONNECTOR-0001",
+ OMRSAuditLogRecordSeverity.EXCEPTION,
+ "The JDBC resource connector for database {0} received an unexpected exception {1} during method {2}; the error message was: {3}",
+ "The connector is unable to process the current request.",
+ "Use the details from the error message to determine the cause of the error and retry the request once it is resolved."),
+
+ /**
+ * JDBC-RESOURCE-CONNECTOR-0002 - The JDBC resource connector has connected to database {0}
+ */
+ CONNECTOR_CONNECTED_TO_DATABASE("JDBC-RESOURCE-CONNECTOR-0002",
+ OMRSAuditLogRecordSeverity.INFO,
+ "The JDBC resource connector has connected to database {0}",
+ "The connector is designed provide a standard interface to a relational database that supports Java Database Connectivity (JDBC). This message confirms that the connector has successfully connected to the database. The number of times that this message is emitted by a connector indicates how many database connections it is using.",
+ "No specific action is required. This message is to confirm that the configuration of the connector is sufficient to connect to the database."),
+
+ /**
+ * JDBC-RESOURCE-CONNECTOR-0002 - The JDBC resource connector has connected to database {0}
+ */
+ UNEXPECTED_ROW_COUNT_FROM_DATABASE("JDBC-RESOURCE-CONNECTOR-0003",
+ OMRSAuditLogRecordSeverity.INFO,
+ "The JDBC resource connector for database {0} has received {1} results from query {2}",
+ "The connector is designed provide a standard interface to a relational database that supports Java Database Connectivity (JDBC). This message confirms that the connector has successfully connected to the database. The number of times that this message is emitted by a connector indicates how many database connections it is using.",
+ "No specific action is required. This message is to confirm that the configuration of the connector is sufficient to connect to the database."),
+
+ /**
+ * JDBC-RESOURCE-CONNECTOR-0009 - JDBC resource connector is closing all {0} connection(s) to database {1} and is shutting down
+ */
+ CONNECTOR_STOPPING("JDBC-RESOURCE-CONNECTOR-0009",
+ OMRSAuditLogRecordSeverity.INFO,
+ "The JDBC resource connector for database {0} is closing all {1} connection(s) to database and is shutting down",
+ "The connector has been requested to disconnect from the database and is ensuring all connections are closed. This message is output by each data source that was created by the connector. Therefore the number of times that this message is emitted indicates the number of data sources were created by the connector.",
+ "No action is required unless there are errors that follow indicating that there were problems shutting down."),
+
+
+
+ ;
+
+ private final String logMessageId;
+ private final OMRSAuditLogRecordSeverity severity;
+ private final String logMessage;
+ private final String systemAction;
+ private final String userAction;
+
+
+ /**
+ * The constructor for JDBCAuditCode expects to be passed one of the enumeration rows defined in
+ * JDBCAuditCode above. For example:
+ *
+ * JDBCAuditCode auditCode = JDBCAuditCode.SERVER_NOT_AVAILABLE;
+ *
+ * This will expand out to the 4 parameters shown below.
+ *
+ * @param messageId - unique id for the message
+ * @param severity - severity of the message
+ * @param message - text for the message
+ * @param systemAction - description of the action taken by the system when the condition happened
+ * @param userAction - instructions for resolving the situation, if any
+ */
+ JDBCAuditCode(String messageId,
+ OMRSAuditLogRecordSeverity severity,
+ String message,
+ String systemAction,
+ String userAction)
+ {
+ this.logMessageId = messageId;
+ this.severity = severity;
+ this.logMessage = message;
+ this.systemAction = systemAction;
+ this.userAction = userAction;
+ }
+
+
+ /**
+ * Retrieve a message definition object for logging. This method is used when there are no message inserts.
+ *
+ * @return message definition object.
+ */
+ @Override
+ public AuditLogMessageDefinition getMessageDefinition()
+ {
+ return new AuditLogMessageDefinition(logMessageId,
+ severity,
+ logMessage,
+ systemAction,
+ userAction);
+ }
+
+
+ /**
+ * Retrieve a message definition object for logging. This method is used when there are values to be inserted into the message.
+ *
+ * @param params array of parameters (all strings). They are inserted into the message according to the numbering in the message text.
+ * @return message definition object.
+ */
+ @Override
+ public AuditLogMessageDefinition getMessageDefinition(String ...params)
+ {
+ AuditLogMessageDefinition messageDefinition = new AuditLogMessageDefinition(logMessageId,
+ severity,
+ logMessage,
+ systemAction,
+ userAction);
+ messageDefinition.setMessageParameters(params);
+ return messageDefinition;
+ }
+
+
+ /**
+ * JSON-style toString
+ *
+ * @return string of property names and values for this enum
+ */
+ @Override
+ public String toString()
+ {
+ return "JDBCAuditCode{" +
+ "logMessageId='" + logMessageId + '\'' +
+ ", severity=" + severity +
+ ", logMessage='" + logMessage + '\'' +
+ ", systemAction='" + systemAction + '\'' +
+ ", userAction='" + userAction + '\'' +
+ '}';
+ }
+}
diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/JDBCErrorCode.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/JDBCErrorCode.java
new file mode 100644
index 00000000000..eb56a767509
--- /dev/null
+++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/JDBCErrorCode.java
@@ -0,0 +1,120 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Copyright Contributors to the ODPi Egeria project. */
+package org.odpi.openmetadata.adapters.connectors.resource.jdbc.ffdc;
+
+import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition;
+import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet;
+
+/**
+ * The JDBCErrorCode is used to define first failure data capture (FFDC) for errors that occur when working with
+ * the Kafka monitor integration connector. It is used in conjunction with both Checked and Runtime (unchecked) exceptions.
+ * The 5 fields in the enum are:
+ *
+ * - HTTP Error Code - for translating between REST and JAVA - Typically the numbers used are:
+ *
+ * - 500 - internal error
+ * - 400 - invalid parameters
+ * - 404 - not found
+ * - 409 - data conflict errors - eg item already defined
+ *
+ * - Error Message Identifier - to uniquely identify the message
+ * - Error Message Text - includes placeholder to allow additional values to be captured
+ * - SystemAction - describes the result of the error
+ * - UserAction - describes how a consumer should correct the error
+ *
+ */
+public enum JDBCErrorCode implements ExceptionMessageSet
+{
+ /**
+ * JDBC-RESOURCE-CONNECTOR-400-001 - Connection {0} has been configured without the URL to the database
+ */
+ NULL_URL(400, "JDBC-RESOURCE-CONNECTOR-400-001",
+ "Connection {0} has been configured without the URL to the database",
+ "The connector is unable to start because the endpoint of its connection has a null address property.",
+ "Update the connection's endpoint to include the connection string needed to connect to the desired database."),
+
+ /**
+ * JDBC-RESOURCE-CONNECTOR-400-002 - The JDBC resource connector for database {0} has been configured with an invalid DriverManager class name of {1} in its connection {2}: ClassNotFoundException message is {3}
+ */
+ BAD_DRIVER_MANAGER_CLASS(400, "JDBC-RESOURCE-CONNECTOR-400-002",
+ "The JDBC resource connector for database {0} has been configured with an invalid DriverManager class name of {1} in its connection {2}: ClassNotFoundException message is {3}",
+ "The connector fails to start.",
+ "Update the 'jdbcDriverManagerClassName' configuration property in this connector's connection. This property is only needed for unusual databases. It may also be worth trying the connector without this property to see if the driver is well known to your JDBC implementation."),
+
+ /**
+ * JDBC-RESOURCE-CONNECTOR-500-001 - The JDBC resource connector for database {0} received an unexpected exception {1} during method {2}; the error message was: {3}
+ */
+ UNEXPECTED_EXCEPTION(500, "JDBC-RESOURCE-CONNECTOR-500-001",
+ "The JDBC resource connector for database {0} received an unexpected exception {1} during method {2}; the error message was: {3}",
+ "The connector is unable to process the current request.",
+ "Use the details from the error message to determine the cause of the error and retry the request once it is resolved."),
+
+ ;
+
+ private final ExceptionMessageDefinition messageDefinition;
+
+
+ /**
+ * The constructor for JDBCErrorCode expects to be passed one of the enumeration rows defined in
+ * JDBCErrorCode above. For example:
+ *
+ * JDBCErrorCode errorCode = JDBCErrorCode.ERROR_SENDING_EVENT;
+ *
+ * This will expand out to the 5 parameters shown below.
+ *
+ * @param httpErrorCode error code to use over REST calls
+ * @param errorMessageId unique identifier for the message
+ * @param errorMessage text for the message
+ * @param systemAction description of the action taken by the system when the error condition happened
+ * @param userAction instructions for resolving the error
+ */
+ JDBCErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction)
+ {
+ this.messageDefinition = new ExceptionMessageDefinition(httpErrorCode,
+ errorMessageId,
+ errorMessage,
+ systemAction,
+ userAction);
+ }
+
+
+ /**
+ * Retrieve a message definition object for an exception. This method is used when there are no message inserts.
+ *
+ * @return message definition object.
+ */
+ @Override
+ public ExceptionMessageDefinition getMessageDefinition()
+ {
+ return messageDefinition;
+ }
+
+
+ /**
+ * Retrieve a message definition object for an exception. This method is used when there are values to be inserted into the message.
+ *
+ * @param params array of parameters (all strings). They are inserted into the message according to the numbering in the message text.
+ * @return message definition object.
+ */
+ @Override
+ public ExceptionMessageDefinition getMessageDefinition(String... params)
+ {
+ messageDefinition.setMessageParameters(params);
+
+ return messageDefinition;
+ }
+
+
+ /**
+ * JSON-style toString
+ *
+ * @return string of property names and values for this enum
+ */
+ @Override
+ public String toString()
+ {
+ return "JDBCErrorCode{" +
+ "messageDefinition=" + messageDefinition +
+ '}';
+ }
+}
diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/package-info.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/package-info.java
new file mode 100644
index 00000000000..f90a638ddd3
--- /dev/null
+++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/package-info.java
@@ -0,0 +1,9 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Copyright Contributors to the ODPi Egeria project. */
+/**
+ * FFDC stands for First Failure Data Capture. The classes in this package provide the message definitions and
+ * descriptions used by the Apache Atlas integration connector. JDBCAuditCode contains the
+ * messages for the audit log and the JDBCErrorCode contains the messages for any exceptions
+ * that are thrown by the connectors.
+ */
+package org.odpi.openmetadata.adapters.connectors.resource.jdbc.ffdc;
diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/properties/JDBCDataValue.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/properties/JDBCDataValue.java
new file mode 100644
index 00000000000..3f57ca613ab
--- /dev/null
+++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/properties/JDBCDataValue.java
@@ -0,0 +1,115 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Copyright Contributors to the ODPi Egeria project. */
+package org.odpi.openmetadata.adapters.connectors.resource.jdbc.properties;
+
+import java.util.Objects;
+
+/**
+ * JDBCDataValue is used when inserting new rows into a table.
+ */
+public class JDBCDataValue
+{
+ private final Object dataValue;
+ private final int targetSQLType;
+ private int scaleOrLength = 0;
+
+
+ /**
+ * Typical constructor does not need the scaleOrLength.
+ *
+ * @param dataValue data value formatted into an appropriate SQL type
+ * @param targetSQLType type of the data value from java.sql.Types
+ */
+ public JDBCDataValue(Object dataValue, int targetSQLType)
+ {
+ this.dataValue = dataValue;
+ this.targetSQLType = targetSQLType;
+ }
+
+
+ /**
+ * Constructor for numbers and streams.
+ *
+ * @param dataValue data value formatted into an appropriate SQL type
+ * @param targetSQLType type of the data value from java.sql.Types
+ * @param scaleOrLength for java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point.
+ * For Java Object types InputStream and Reader, this is the length of the data in the stream or reader.
+ * For all other types, this value will be ignored.
+ */
+ public JDBCDataValue(Object dataValue, int targetSQLType, int scaleOrLength)
+ {
+ this.dataValue = dataValue;
+ this.targetSQLType = targetSQLType;
+ this.scaleOrLength = scaleOrLength;
+ }
+
+
+ /**
+ * The value formatted into the appropriate SQL type.
+ *
+ * @return object
+ */
+ public Object getDataValue()
+ {
+ return dataValue;
+ }
+
+
+ /**
+ * The type of the data value using the values from java.sql.Types.
+ *
+ * @return int
+ */
+ public int getTargetSQLType()
+ {
+ return targetSQLType;
+ }
+
+
+ /**
+ * Return the scaleOrLength. For java.sql.Types.DECIMAL or java.sql.Types.NUMERIC types, this is the number of digits after the decimal point.
+ * For Java Object types InputStream and Reader, this is the length of the data in the stream or reader.
+ * For all other types, this value will be ignored.
+ *
+ * @return int
+ */
+ public int getScaleOrLength()
+ {
+ return scaleOrLength;
+ }
+
+
+ @Override
+ public String toString()
+ {
+ return "JDBCDataValue{" +
+ "dataValue=" + dataValue +
+ ", targetSQLType=" + targetSQLType +
+ ", scaleOrLength=" + scaleOrLength +
+ '}';
+ }
+
+
+ @Override
+ public boolean equals(Object objectToCompare)
+ {
+ if (this == objectToCompare)
+ {
+ return true;
+ }
+ if (! (objectToCompare instanceof JDBCDataValue dataValue1))
+ {
+ return false;
+ }
+ return targetSQLType == dataValue1.targetSQLType &&
+ scaleOrLength == dataValue1.scaleOrLength &&
+ Objects.equals(dataValue, dataValue1.dataValue);
+ }
+
+
+ @Override
+ public int hashCode()
+ {
+ return Objects.hash(dataValue, targetSQLType, scaleOrLength);
+ }
+}
diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/AuditCodeTest.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/AuditCodeTest.java
new file mode 100644
index 00000000000..0b98a5661e2
--- /dev/null
+++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/AuditCodeTest.java
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Copyright Contributors to the ODPi Egeria project. */
+package org.odpi.openmetadata.adapters.connectors.resource.jdbc.ffdc;
+
+import org.odpi.openmetadata.test.unittest.utilities.AuditLogMessageSetTest;
+import org.testng.annotations.Test;
+
+
+/**
+ * Verify the JDBCAuditCode enum contains unique message ids, non-null names and descriptions and can be
+ * serialized to JSON and back again.
+ */
+public class AuditCodeTest extends AuditLogMessageSetTest
+{
+ final static String messageIdPrefix = "JDBC-RESOURCE-CONNECTOR";
+
+ /**
+ * Validated the values of the enum.
+ */
+ @Test public void testAllAuditCodeValues()
+ {
+ for (JDBCAuditCode errorCode : JDBCAuditCode.values())
+ {
+ super.testSingleAuditCodeValue(errorCode, messageIdPrefix);
+ }
+ }
+}
diff --git a/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/ErrorCodeTest.java b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/ErrorCodeTest.java
new file mode 100644
index 00000000000..0967f6ed8d5
--- /dev/null
+++ b/open-metadata-implementation/adapters/open-connectors/data-store-connectors/jdbc-resource-connector/src/test/java/org/odpi/openmetadata/adapters/connectors/resource/jdbc/ffdc/ErrorCodeTest.java
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Copyright Contributors to the ODPi Egeria project. */
+package org.odpi.openmetadata.adapters.connectors.resource.jdbc.ffdc;
+
+import org.odpi.openmetadata.test.unittest.utilities.ExceptionMessageSetTest;
+import org.testng.annotations.Test;
+
+
+/**
+ * Verify the JDBCErrorCode enum contains unique message ids, non-null names and descriptions and can be
+ * serialized to JSON and back again.
+ */
+public class ErrorCodeTest extends ExceptionMessageSetTest
+{
+ final static String messageIdPrefix = "JDBC-INTEGRATION-CONNECTOR";
+
+ /**
+ * Validated the values of the enum.
+ */
+ @Test public void testAllErrorCodeValues()
+ {
+ for (JDBCErrorCode errorCode : JDBCErrorCode.values())
+ {
+ super.testSingleErrorCodeValue(errorCode, messageIdPrefix);
+ }
+ }
+}
diff --git a/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/CSVDiscoveryServiceProvider.java b/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/CSVDiscoveryServiceProvider.java
index 1cf709acdbd..658f918c179 100644
--- a/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/CSVDiscoveryServiceProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/CSVDiscoveryServiceProvider.java
@@ -33,6 +33,7 @@ public CSVDiscoveryServiceProvider()
connectorType.setDisplayName(connectorTypeName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
}
diff --git a/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/DuplicateSuspectDiscoveryProvider.java b/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/DuplicateSuspectDiscoveryProvider.java
index fc934f0df1c..6ce25263e7a 100644
--- a/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/DuplicateSuspectDiscoveryProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/DuplicateSuspectDiscoveryProvider.java
@@ -32,6 +32,7 @@ public DuplicateSuspectDiscoveryProvider()
connectorType.setDisplayName(connectorTypeName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
}
diff --git a/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/SequentialDiscoveryPipelineProvider.java b/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/SequentialDiscoveryPipelineProvider.java
index c1029dcbca3..c089491657c 100644
--- a/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/SequentialDiscoveryPipelineProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/discovery-service-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/discoveryservices/SequentialDiscoveryPipelineProvider.java
@@ -15,6 +15,8 @@ public class SequentialDiscoveryPipelineProvider extends DiscoveryServiceProvide
static final String connectorTypeName = "Sequential Discovery Pipeline Connector";
static final String connectorTypeDescription = "Connector supports the sequential execution of discovery services.";
+ static final String openPipelineServiceAssetTypeName = "OpenDiscoveryPipeline";
+
/**
* Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific
* discovery service implementation.
@@ -32,6 +34,7 @@ public SequentialDiscoveryPipelineProvider()
connectorType.setDisplayName(connectorTypeName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(openPipelineServiceAssetTypeName);
super.connectorTypeBean = connectorType;
}
diff --git a/open-metadata-implementation/adapters/open-connectors/dynamic-archiver-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/dynamicarchivers/DynamicArchiveProvider.java b/open-metadata-implementation/adapters/open-connectors/dynamic-archiver-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/dynamicarchivers/DynamicArchiveProvider.java
index 3b56a6d54d3..55d328f117a 100644
--- a/open-metadata-implementation/adapters/open-connectors/dynamic-archiver-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/dynamicarchivers/DynamicArchiveProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/dynamic-archiver-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/dynamicarchivers/DynamicArchiveProvider.java
@@ -2,6 +2,7 @@
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.adapters.connectors.dynamicarchivers;
+import org.odpi.openmetadata.engineservices.repositorygovernance.connector.RepositoryGovernanceProvider;
import org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionServiceProviderBase;
import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditingComponent;
@@ -11,7 +12,7 @@
/**
* DynamicArchiveProvider implements the base class for the connector provider for a archive service.
*/
-public abstract class DynamicArchiveProvider extends GovernanceActionServiceProviderBase
+public abstract class DynamicArchiveProvider extends RepositoryGovernanceProvider
{
static final String ARCHIVE_NAME_PROPERTY = "archiveName";
static final String ARCHIVE_GUID_PROPERTY = "archiveGUID";
diff --git a/open-metadata-implementation/adapters/open-connectors/dynamic-archiver-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/dynamicarchivers/glossary/GlossaryDynamicArchiverProvider.java b/open-metadata-implementation/adapters/open-connectors/dynamic-archiver-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/dynamicarchivers/glossary/GlossaryDynamicArchiverProvider.java
index fa3ba11e633..c4c8dc6e329 100644
--- a/open-metadata-implementation/adapters/open-connectors/dynamic-archiver-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/dynamicarchivers/glossary/GlossaryDynamicArchiverProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/dynamic-archiver-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/dynamicarchivers/glossary/GlossaryDynamicArchiverProvider.java
@@ -18,7 +18,7 @@ public class GlossaryDynamicArchiverProvider extends DynamicArchiveProvider
private static final String connectorTypeGUID = "02cfb290-43cb-497c-928e-267bd3d69324";
private static final String connectorTypeQualifiedName = "Egeria:ArchiveService:Glossary";
private static final String connectorTypeDisplayName = "Glossary Dynamic Archive Service";
- private static final String connectorTypeDescription = "Archive Service that writes a glossary to an archive.";
+ private static final String connectorTypeDescription = "Archive Service that writes a glossary to an archive as the glossary is developed.";
static final String GLOSSARY_NAME_PROPERTY = "glossaryName";
@@ -55,6 +55,7 @@ public GlossaryDynamicArchiverProvider()
connectorType.setDisplayName(connectorTypeDisplayName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
if (recognizedConfigurationProperties == null)
{
diff --git a/open-metadata-implementation/adapters/open-connectors/event-bus-connectors/open-metadata-topic-connectors/kafka-open-metadata-topic-connector/src/main/java/org/odpi/openmetadata/adapters/eventbus/topic/kafka/KafkaOpenMetadataTopicProvider.java b/open-metadata-implementation/adapters/open-connectors/event-bus-connectors/open-metadata-topic-connectors/kafka-open-metadata-topic-connector/src/main/java/org/odpi/openmetadata/adapters/eventbus/topic/kafka/KafkaOpenMetadataTopicProvider.java
index 92644a2840f..be66b7d40b5 100644
--- a/open-metadata-implementation/adapters/open-connectors/event-bus-connectors/open-metadata-topic-connectors/kafka-open-metadata-topic-connector/src/main/java/org/odpi/openmetadata/adapters/eventbus/topic/kafka/KafkaOpenMetadataTopicProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/event-bus-connectors/open-metadata-topic-connectors/kafka-open-metadata-topic-connector/src/main/java/org/odpi/openmetadata/adapters/eventbus/topic/kafka/KafkaOpenMetadataTopicProvider.java
@@ -40,14 +40,14 @@ public class KafkaOpenMetadataTopicProvider extends OpenMetadataTopicProvider
*/
private static final Class> connectorClass = KafkaOpenMetadataTopicConnector.class;
- private static final String expectedDataFormat = "PLAINTEXT";
- private static final String assetTypeName = "KafkaTopic";
+ private static final String expectedDataFormat = "PLAINTEXT";
+ private static final String supportedAssetTypeName = "KafkaTopic";
- public static final String producerPropertyName = "producer";
- public static final String consumerPropertyName = "consumer";
- public static final String egeriaConsumerPropertyName = "egeria_kafka_consumer";
- public static final String serverIdPropertyName = "local.server.id";
- public static final String sleepTimeProperty = "sleepTime";
+ public static final String producerPropertyName = "producer";
+ public static final String consumerPropertyName = "consumer";
+ public static final String egeriaConsumerPropertyName = "egeria_kafka_consumer";
+ public static final String serverIdPropertyName = "local.server.id";
+ public static final String sleepTimeProperty = "sleepTime";
/**
* Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific
@@ -73,7 +73,7 @@ public KafkaOpenMetadataTopicProvider()
connectorType.setDescription(connectorDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
- connectorType.setSupportedAssetTypeName(assetTypeName);
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
connectorType.setExpectedDataFormat(expectedDataFormat);
connectorInterfaces.add(OpenMetadataTopic.class.getName());
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionConnector.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionConnector.java
index 61da78bdb9f..b1775113181 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionConnector.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionConnector.java
@@ -622,7 +622,7 @@ private String getPathNameFromConnection(String assetGUID,
final String methodName = "getPathNameFromConnection";
OpenMetadataStore store = governanceContext.getOpenMetadataStore();
- OpenMetadataElement connection = connectionLink.getElementProperties();
+ OpenMetadataElement connection = connectionLink.getElement();
if (connection == null)
{
@@ -672,7 +672,7 @@ else if (endpointLinks.size() > 1)
}
else
{
- OpenMetadataElement endpoint = endpointLinks.get(0).getElementProperties();
+ OpenMetadataElement endpoint = endpointLinks.get(0).getElement();
if (endpoint == null)
{
@@ -878,7 +878,7 @@ private String getFolderGUID(String fileGUID) throws InvalidParameterException,
{
if (relatedMetadataElement != null)
{
- folderGUID = relatedMetadataElement.getElementProperties().getElementGUID();
+ folderGUID = relatedMetadataElement.getElement().getElementGUID();
}
}
}
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionProvider.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionProvider.java
index 8766757b59b..d691852b453 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/provisioning/MoveCopyFileGovernanceActionProvider.java
@@ -91,6 +91,7 @@ public MoveCopyFileGovernanceActionProvider()
connectorType.setDisplayName(connectorTypeDisplayName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
List recognizedConfigurationProperties = new ArrayList<>();
recognizedConfigurationProperties.add(TARGET_FILE_NAME_PATTERN_PROPERTY);
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/OriginSeekerGovernanceActionConnector.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/OriginSeekerGovernanceActionConnector.java
index d16091a349f..9ada9479aa9 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/OriginSeekerGovernanceActionConnector.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/OriginSeekerGovernanceActionConnector.java
@@ -251,7 +251,7 @@ private List getOrigins(OpenMetadataElement asset,
if (lineageRelationships.contains(relationshipName))
{
- OpenMetadataElement nextAsset = lineageLink.getElementProperties();
+ OpenMetadataElement nextAsset = lineageLink.getElement();
/*
* Some lineage graphs are circular so the covered entity guids prevents the same element from being processed twice.
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/OriginSeekerGovernanceActionProvider.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/OriginSeekerGovernanceActionProvider.java
index f64499c3336..77bf0a642ea 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/OriginSeekerGovernanceActionProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/OriginSeekerGovernanceActionProvider.java
@@ -57,6 +57,7 @@ public OriginSeekerGovernanceActionProvider()
connectorType.setDisplayName(connectorTypeDisplayName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
}
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/QualifiedNamePeerDuplicateGovernanceActionProvider.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/QualifiedNamePeerDuplicateGovernanceActionProvider.java
index e605bd7920c..e64610df449 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/QualifiedNamePeerDuplicateGovernanceActionProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/QualifiedNamePeerDuplicateGovernanceActionProvider.java
@@ -53,6 +53,7 @@ public QualifiedNamePeerDuplicateGovernanceActionProvider()
connectorType.setDisplayName(connectorTypeDisplayName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
}
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/ZonePublisherGovernanceActionProvider.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/ZonePublisherGovernanceActionProvider.java
index b4f16aac659..e1d89dbef5f 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/ZonePublisherGovernanceActionProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/remediation/ZonePublisherGovernanceActionProvider.java
@@ -58,6 +58,7 @@ public ZonePublisherGovernanceActionProvider()
connectorType.setDisplayName(connectorTypeDisplayName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
List recognizedConfigurationProperties = new ArrayList<>();
recognizedConfigurationProperties.add(PUBLISH_ZONES_PROPERTY);
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/verification/VerifyAssetGovernanceActionProvider.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/verification/VerifyAssetGovernanceActionProvider.java
index 89c85d98c0a..bc5547bdca1 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/verification/VerifyAssetGovernanceActionProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/verification/VerifyAssetGovernanceActionProvider.java
@@ -42,7 +42,7 @@ public class VerifyAssetGovernanceActionProvider extends GovernanceActionService
static final String PROVISIONING_COMPLETE_GUARD = "provisioning-complete";
static final String PROVISIONING_FAILED_GUARD = "provisioning-failed";
- private static final String connectorClassName = MoveCopyFileGovernanceActionConnector.class.getName();
+ private static final String connectorClassName = null; // todo
/**
@@ -80,6 +80,7 @@ public VerifyAssetGovernanceActionProvider()
connectorType.setDisplayName(connectorTypeDisplayName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
List recognizedConfigurationProperties = new ArrayList<>();
recognizedConfigurationProperties.add(PROVISION_UNCATALOGUED_FILES_CONFIGURATION_PROPERTY);
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/verification/VerifyFileFolderGovernanceActionProvider.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/verification/VerifyFileFolderGovernanceActionProvider.java
index 5fddc009b44..cf3864489d8 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/verification/VerifyFileFolderGovernanceActionProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/verification/VerifyFileFolderGovernanceActionProvider.java
@@ -72,6 +72,7 @@ public VerifyFileFolderGovernanceActionProvider()
connectorType.setDisplayName(connectorTypeDisplayName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
List recognizedConfigurationProperties = new ArrayList<>();
recognizedConfigurationProperties.add(FOLDER_GUID_PROPERTY);
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericElementWatchdogGovernanceActionProvider.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericElementWatchdogGovernanceActionProvider.java
index e5be06d4c7a..196c7828e5a 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericElementWatchdogGovernanceActionProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericElementWatchdogGovernanceActionProvider.java
@@ -100,6 +100,7 @@ public GenericElementWatchdogGovernanceActionProvider()
connectorType.setDisplayName(connectorTypeDisplayName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
List recognizedConfigurationProperties = new ArrayList<>();
recognizedConfigurationProperties.add(INTERESTING_TYPE_NAME_PROPERTY);
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericFolderWatchdogGovernanceActionConnector.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericFolderWatchdogGovernanceActionConnector.java
index 0b793361f1e..4dd0d7fd000 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericFolderWatchdogGovernanceActionConnector.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericFolderWatchdogGovernanceActionConnector.java
@@ -437,7 +437,7 @@ private String getFolderGUID(String fileGUID,
{
if (relatedMetadataElement != null)
{
- folderGUID = relatedMetadataElement.getElementProperties().getElementGUID();
+ folderGUID = relatedMetadataElement.getElement().getElementGUID();
}
}
}
diff --git a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericFolderWatchdogGovernanceActionProvider.java b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericFolderWatchdogGovernanceActionProvider.java
index 58a40f99bd1..7cb59a647ec 100644
--- a/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericFolderWatchdogGovernanceActionProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/governance-action-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/governanceactions/watchdog/GenericFolderWatchdogGovernanceActionProvider.java
@@ -78,6 +78,7 @@ public GenericFolderWatchdogGovernanceActionProvider()
connectorType.setDisplayName(connectorTypeDisplayName);
connectorType.setDescription(connectorTypeDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
List recognizedConfigurationProperties = new ArrayList<>();
recognizedConfigurationProperties.add(FOLDER_NAME_PROPERTY);
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasIntegrationConnector.java
index db9eb41ab8a..78d987fe18a 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasIntegrationConnector.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasIntegrationConnector.java
@@ -191,7 +191,10 @@ public void start() throws ConnectorCheckedException
error);
}
- throw new ConnectorCheckedException(ApacheAtlasErrorCode.UNEXPECTED_EXCEPTION.getMessageDefinition(),
+ throw new ConnectorCheckedException(ApacheAtlasErrorCode.UNEXPECTED_EXCEPTION.getMessageDefinition(connectorName,
+ error.getClass().getName(),
+ methodName,
+ error.getMessage()),
this.getClass().getName(),
methodName,
error);
@@ -294,7 +297,10 @@ public void refresh() throws ConnectorCheckedException
error);
}
- throw new ConnectorCheckedException(ApacheAtlasErrorCode.UNEXPECTED_EXCEPTION.getMessageDefinition(),
+ throw new ConnectorCheckedException(ApacheAtlasErrorCode.UNEXPECTED_EXCEPTION.getMessageDefinition(connectorName,
+ error.getClass().getName(),
+ methodName,
+ error.getMessage()),
this.getClass().getName(),
methodName,
error);
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasIntegrationProvider.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasIntegrationProvider.java
index 9a3f9b5f5e0..26eede20bda 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasIntegrationProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasIntegrationProvider.java
@@ -75,6 +75,7 @@ public ApacheAtlasIntegrationProvider()
connectorType.setDisplayName(connectorDisplayName);
connectorType.setDescription(connectorDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
List recognizedConfigurationProperties = new ArrayList<>();
recognizedConfigurationProperties.add(EGERIA_GLOSSARY_QUALIFIED_NAME_CONFIGURATION_PROPERTY);
recognizedConfigurationProperties.add(ATLAS_GLOSSARY_NAME_CONFIGURATION_PROPERTY);
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasRESTClient.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasRESTClient.java
index 1482df58576..8b0a61dff2b 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasRESTClient.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/ApacheAtlasRESTClient.java
@@ -86,7 +86,10 @@ public class ApacheAtlasRESTClient
}
catch (Exception error)
{
- throw new InvalidParameterException(ApacheAtlasErrorCode.UNEXPECTED_EXCEPTION.getMessageDefinition(connectorName, error.getMessage()),
+ throw new InvalidParameterException(ApacheAtlasErrorCode.UNEXPECTED_EXCEPTION.getMessageDefinition(connectorName,
+ error.getClass().getName(),
+ methodName,
+ error.getMessage()),
this.getClass().getName(),
methodName,
error,
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/modules/AtlasGlossaryIntegrationModule.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/modules/AtlasGlossaryIntegrationModule.java
index 8134563a494..d17d2e183d4 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/modules/AtlasGlossaryIntegrationModule.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/atlas-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/apacheatlas/modules/AtlasGlossaryIntegrationModule.java
@@ -113,8 +113,15 @@ public AtlasGlossaryIntegrationModule(String connectorName,
if (configurationProperties != null)
{
- fixedEgeriaGlossaryQualifiedName = configurationProperties.get(ApacheAtlasIntegrationProvider.EGERIA_GLOSSARY_QUALIFIED_NAME_CONFIGURATION_PROPERTY).toString();
- atlasGlossaryName = configurationProperties.get(ApacheAtlasIntegrationProvider.ATLAS_GLOSSARY_NAME_CONFIGURATION_PROPERTY).toString();
+ if (configurationProperties.get(ApacheAtlasIntegrationProvider.EGERIA_GLOSSARY_QUALIFIED_NAME_CONFIGURATION_PROPERTY) != null)
+ {
+ fixedEgeriaGlossaryQualifiedName = configurationProperties.get(ApacheAtlasIntegrationProvider.EGERIA_GLOSSARY_QUALIFIED_NAME_CONFIGURATION_PROPERTY).toString();
+ }
+
+ if (configurationProperties.get(ApacheAtlasIntegrationProvider.ATLAS_GLOSSARY_NAME_CONFIGURATION_PROPERTY) != null)
+ {
+ atlasGlossaryName = configurationProperties.get(ApacheAtlasIntegrationProvider.ATLAS_GLOSSARY_NAME_CONFIGURATION_PROPERTY).toString();
+ }
}
/*
@@ -1750,21 +1757,26 @@ private void syncEgeriaGlossaryCategoryHierarchyInAtlas(GlossaryCategoryElement
if (atlasParentCategory == null)
{
- AtlasRelationship atlasRelationship = new AtlasRelationship();
+ String atlasParentCategoryGUID = this.getAtlasGUID(egeriaParentCategory);
- atlasRelationship.setTypeName(atlasCategoryHierarchyTypeName);
+ if (atlasParentCategoryGUID != null)
+ {
+ AtlasRelationship atlasRelationship = new AtlasRelationship();
+
+ atlasRelationship.setTypeName(atlasCategoryHierarchyTypeName);
- AtlasObjectId end1 = new AtlasObjectId();
+ AtlasObjectId end1 = new AtlasObjectId();
- end1.setGuid(atlasParentCategory.getEntity().getGuid());
- atlasRelationship.setEnd1(end1);
+ end1.setGuid(atlasParentCategoryGUID);
+ atlasRelationship.setEnd1(end1);
- AtlasObjectId end2 = new AtlasObjectId();
+ AtlasObjectId end2 = new AtlasObjectId();
- end2.setGuid(atlasGlossaryCategoryGUID);
- atlasRelationship.setEnd2(end2);
+ end2.setGuid(atlasGlossaryCategoryGUID);
+ atlasRelationship.setEnd2(end2);
- atlasClient.addRelationship(atlasRelationship);
+ atlasClient.addRelationship(atlasRelationship);
+ }
}
}
else if (atlasParentCategory != null)
@@ -2521,6 +2533,7 @@ private GlossaryElement getGlossaryByQualifiedName(String glossaryQualifiedName,
throw new ConnectorCheckedException(ApacheAtlasErrorCode.UNEXPECTED_EXCEPTION.getMessageDefinition(connectorName,
error.getClass().getName(),
+ methodName,
error.getMessage()),
this.getClass().getName(),
methodName,
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ElasticsearchIntegrationProvider.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ElasticsearchIntegrationProvider.java
index 2893f47027d..aa46070cb8b 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ElasticsearchIntegrationProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/elasticsearch-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/elasticsearch/ElasticsearchIntegrationProvider.java
@@ -3,8 +3,8 @@
package org.odpi.openmetadata.adapters.connectors.integration.elasticsearch;
-import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType;
+import org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnectorProvider;
import java.util.ArrayList;
import java.util.List;
@@ -13,7 +13,7 @@
/**
* OpenAPIMonitorIntegrationProvider is the base class provider for the open API integration connector.
*/
-public class ElasticsearchIntegrationProvider extends ConnectorProviderBase
+public class ElasticsearchIntegrationProvider extends IntegrationConnectorProvider
{
private static final String connectorTypeGUID = "4cf65dbf-0808-4968-819b-6a49a9fe537a";
private static final String connectorTypeQualifiedName = "Egeria:IntegrationConnector:ElasticsearchIntegrationProvider";
@@ -45,6 +45,7 @@ public ElasticsearchIntegrationProvider()
recognizedConfigurationProperties.add(TEMPLATE_QUALIFIED_NAME_CONFIGURATION_PROPERTY);
connectorType.setRecognizedConfigurationProperties(recognizedConfigurationProperties);
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
}
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/BasicFilesMonitorIntegrationProviderBase.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/BasicFilesMonitorIntegrationProviderBase.java
index 219019e32a1..dd01555edbe 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/BasicFilesMonitorIntegrationProviderBase.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/files-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/basicfiles/BasicFilesMonitorIntegrationProviderBase.java
@@ -63,6 +63,7 @@ class BasicFilesMonitorIntegrationProviderBase extends IntegrationConnectorProvi
recognizedConfigurationProperties.add(ALLOW_CATALOG_DELETE_CONFIGURATION_PROPERTY);
connectorType.setRecognizedConfigurationProperties(recognizedConfigurationProperties);
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/build.gradle b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/build.gradle
index 2279c6cfb3c..d583f3d9b5b 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/build.gradle
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/build.gradle
@@ -18,6 +18,10 @@ dependencies {
compileOnly project(':open-metadata-implementation:integration-services:database-integrator:database-integrator-api')
compileOnly project(':open-metadata-implementation:repository-services:repository-services-apis')
compileOnly project(':open-metadata-implementation:adapters:open-connectors:data-store-connectors:jdbc-resource-connector')
+ testImplementation project(':open-metadata-implementation:frameworks:audit-log-framework')
+ testImplementation project(':open-metadata-implementation:repository-services:repository-services-apis')
+ testImplementation project(':open-metadata-test:open-metadata-ut')
+ testImplementation 'org.testng:testng'
compileOnly 'org.apache.commons:commons-lang3'
compileOnly 'org.apache.commons:commons-collections4'
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnector.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnector.java
index 0943b2640fc..09330e69fc8 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnector.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnector.java
@@ -6,7 +6,6 @@
import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.JdbcMetadataTransfer;
import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.customization.TransferCustomizations;
import org.odpi.openmetadata.adapters.connectors.resource.jdbc.JDBCResourceConnector;
-import org.odpi.openmetadata.frameworks.connectors.Connector;
import org.odpi.openmetadata.frameworks.connectors.ffdc.ConnectorCheckedException;
import org.odpi.openmetadata.integrationservices.database.connector.DatabaseIntegratorConnector;
@@ -14,7 +13,6 @@
import java.sql.DatabaseMetaData;
import java.sql.SQLException;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import java.util.Optional;
@@ -30,27 +28,23 @@
*/
public class JDBCIntegrationConnector extends DatabaseIntegratorConnector
{
-
private JDBCResourceConnector JDBCResourceConnector;
+
/**
- * Set up the list of connectors that this virtual connector will use to support its interface.
- * The connectors are initialized waiting to start. When start() is called on the
- * virtual connector, it needs to pass start() to each of the embedded connectors. Similarly for
- * disconnect().
+ * Indicates that the connector is completely configured and can begin processing.
+ * This call can be used to register with non-blocking services.
*
- * @param embeddedConnectors list of connectors
+ * @throws ConnectorCheckedException there is a problem within the connector.
*/
- @Override
- public void initializeEmbeddedConnectors(List embeddedConnectors)
+ public void start() throws ConnectorCheckedException
{
- super.initializeEmbeddedConnectors(embeddedConnectors);
+ //todo - properly extract the JDBC resource connector (and if no embedded then create connection and call connector broker.
+ JDBCResourceConnector = (JDBCResourceConnector) embeddedConnectors.get(0);
- JDBCResourceConnector = (JDBCResourceConnector) embeddedConnectors.get(0);
}
-
/**
* Requests that the connector does a comparison of the metadata in the third party technology and open metadata repositories.
* Refresh is called when the integration connector first starts and then at intervals defined in the connector's configuration
@@ -101,7 +95,7 @@ private Connection connect()
String methodName = "connect";
try
{
- return JDBCResourceConnector.asDataSource().getConnection();
+ return JDBCResourceConnector.getDataSource().getConnection();
}
catch (SQLException sqlException)
{
@@ -112,6 +106,7 @@ private Connection connect()
return null;
}
+
public void close(Connection connection)
{
String methodName = "close";
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnectorProvider.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnectorProvider.java
index 41f76c45fa1..845f7f3ea36 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnectorProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/JDBCIntegrationConnectorProvider.java
@@ -3,33 +3,61 @@
package org.odpi.openmetadata.adapters.connectors.integration.jdbc;
import org.odpi.openmetadata.adapters.connectors.integration.jdbc.transfer.customization.TransferCustomizations;
-import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase;
+import org.odpi.openmetadata.frameworks.auditlog.AuditLogReportingComponent;
import org.odpi.openmetadata.frameworks.connectors.properties.beans.ConnectorType;
+import org.odpi.openmetadata.frameworks.integration.connectors.IntegrationConnectorProvider;
import java.util.ArrayList;
import java.util.List;
-public class JDBCIntegrationConnectorProvider extends ConnectorProviderBase {
+public class JDBCIntegrationConnectorProvider extends IntegrationConnectorProvider
+{
+ /*
+ * Unique identifier of the connector for the audit log.
+ */
+ private static final int connectorComponentId = 661;
+
+ /*
+ * Unique identifier for the connector type.
+ */
+ private static final String connectorTypeGUID = "49cd6772-1efd-40bb-a1d9-cc9460962ff6";
- static final String CONNECTOR_TYPE_GUID = "49cd6772-1efd-40bb-a1d9-cc9460962ff6";
- static final String CONNECTOR_TYPE_NAME = "JDBC Database Connector";
- static final String CONNECTOR_TYPE_DESCRIPTION = "Connector supports JDBC Database instance";
+ /*
+ * Descriptive information about the connector for the connector type and audit log.
+ */
+ private static final String connectorQualifiedName = "Egeria:IntegrationConnector:Database:JDBC";
+ private static final String connectorDisplayName = "JDBC Relational Database Integration Connector";
+ private static final String connectorDescription = "This connector retrieves schema information about a relational database's tables and columns and catalogs them in the open metadata ecosystem.";
+ private static final String connectorWikiPage = "https://egeria-project.org/connectors/integration/jdbc-integration-connector";
+
+ /*
+ * Class of the connector.
+ */
+ private static final Class> connectorClass = JDBCIntegrationConnector.class;
/**
* Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific
- * store implementation.
+ * connector implementation.
*/
- public JDBCIntegrationConnectorProvider(){
- super.setConnectorClassName(JDBCIntegrationConnector.class.getName());
+ public JDBCIntegrationConnectorProvider()
+ {
+ super();
+ /*
+ * Set up the class name of the connector that this provider creates.
+ */
+ super.setConnectorClassName(connectorClass.getName());
+
+ /*
+ * Set up the connector type that should be included in a connection used to configure this connector.
+ */
ConnectorType connectorType = new ConnectorType();
connectorType.setType(ConnectorType.getConnectorTypeType());
- connectorType.setGUID(CONNECTOR_TYPE_GUID);
- connectorType.setQualifiedName(CONNECTOR_TYPE_NAME);
- connectorType.setDisplayName(CONNECTOR_TYPE_NAME);
- connectorType.setDescription(CONNECTOR_TYPE_DESCRIPTION);
+ connectorType.setGUID(connectorTypeGUID);
+ connectorType.setQualifiedName(connectorQualifiedName);
+ connectorType.setDisplayName(connectorDisplayName);
+ connectorType.setDescription(connectorDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
-
List recognizedConfigurationProperties = new ArrayList<>();
recognizedConfigurationProperties.add(TransferCustomizations.INCLUDE_SCHEMA_NAMES);
recognizedConfigurationProperties.add(TransferCustomizations.EXCLUDE_SCHEMA_NAMES);
@@ -38,7 +66,20 @@ public JDBCIntegrationConnectorProvider(){
recognizedConfigurationProperties.add(TransferCustomizations.INCLUDE_COLUMN_NAMES);
recognizedConfigurationProperties.add(TransferCustomizations.EXCLUDE_COLUMN_NAMES);
connectorType.setRecognizedConfigurationProperties(recognizedConfigurationProperties);
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
+
+ /*
+ * Set up the component description used in the connector's audit log messages.
+ */
+ AuditLogReportingComponent componentDescription = new AuditLogReportingComponent();
+
+ componentDescription.setComponentId(connectorComponentId);
+ componentDescription.setComponentName(connectorQualifiedName);
+ componentDescription.setComponentDescription(connectorDescription);
+ componentDescription.setComponentWikiURL(connectorWikiPage);
+
+ super.setConnectorComponentDescription(componentDescription);
}
}
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/ffdc/JDBCIntegrationConnectorErrorCode.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/ffdc/JDBCIntegrationConnectorErrorCode.java
new file mode 100644
index 00000000000..cd0c62b2321
--- /dev/null
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/ffdc/JDBCIntegrationConnectorErrorCode.java
@@ -0,0 +1,168 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Copyright Contributors to the ODPi Egeria project. */
+package org.odpi.openmetadata.adapters.connectors.integration.jdbc.ffdc;
+
+import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition;
+import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageSet;
+
+/**
+ * The JDBCErrorCode is used to define first failure data capture (FFDC) for errors that occur when working with
+ * the Kafka monitor integration connector. It is used in conjunction with both Checked and Runtime (unchecked) exceptions.
+ * The 5 fields in the enum are:
+ *
+ * - HTTP Error Code - for translating between REST and JAVA - Typically the numbers used are:
+ *
+ * - 500 - internal error
+ * - 400 - invalid parameters
+ * - 404 - not found
+ * - 409 - data conflict errors - eg item already defined
+ *
+ * - Error Message Identifier - to uniquely identify the message
+ * - Error Message Text - includes placeholder to allow additional values to be captured
+ * - SystemAction - describes the result of the error
+ * - UserAction - describes how a consumer should correct the error
+ *
+ */
+public enum JDBCIntegrationConnectorErrorCode implements ExceptionMessageSet
+{
+ /**
+ * JDBC-INTEGRATION-CONNECTOR-400-001 - Integration connector {0} has been configured without the URL to Apache Atlas
+ */
+ NULL_URL(400, "JDBC-INTEGRATION-CONNECTOR-400-001",
+ "Integration connector {0} has been configured without the URL to Apache Atlas",
+ "The connector is move to FAILED status and will not be called by the integration daemon until the configuration error has been corrected.",
+ "The Apache Atlas URL is configured in the integration connector's connection endpoint in the address property. Typically it is the host name and port where Apache Atlas is listening. The connection is either found in the Integration Daemon's configuration, or, if the Integration Daemon is configured with integration groups, in the open metadata definition of the appropriate integration group."),
+
+ /**
+ * JDBC-INTEGRATION-CONNECTOR-400-002 - Integration connector {0} has been configured with either a null userId or password for connecting to Apache Atlas
+ */
+ NULL_USER(400, "JDBC-INTEGRATION-CONNECTOR-400-002",
+ "Integration connector {0} has been configured with either a null userId or password for connecting to Apache Atlas",
+ "The connector is moved to FAILED status and will no longer be called to synchronize metadata.",
+ "Update the connection information for the connector. " +
+ "This may have been supplied through the Integration Daemon's configuration, " +
+ "or if the Integration Daemon is using integration groups, " +
+ "the connection information is stored in the open metadata ecosystem. " +
+ "It is possible to supply the userId and password directly in the connection object or via an embedded SecretsConnector."),
+
+ /**
+ * JDBC-INTEGRATION-CONNECTOR-400-003 - Integration connector {0} has been configured without a metadataSourceQualifiedName value
+ */
+ NULL_ASSET_MANAGER(400, "JDBC-INTEGRATION-CONNECTOR-400-003",
+ "Integration connector {0} has been configured without a metadataSourceQualifiedName value",
+ "The connector uses the metadataSourceQualifiedName to identify the metadata that originated in Apache Atlas so that any updates/deletes to this metadata are reflected into the open metadata ecosystem. Otherwise, any changes will be overridden by the values in the open metadata ecosystem. In order to ensure metadata integrity, the connector is moved to FAILED status and will no longer be called to synchronize metadata until the metadata source name has been supplied.",
+ "Update the metadata source qualified name for the connector. " +
+ "This may have been supplied through the Integration Daemon's configuration, " +
+ "or, if the Integration Daemon is using integration groups, " +
+ "the connection information is stored in the connector's RegisteredIntegrationConnector relationship in the open metadata ecosystem."),
+
+ /**
+ * JDBC-INTEGRATION-CONNECTOR-400-004 - Glossary category {0} already exists in Apache Atlas
+ */
+ CATEGORY_ALREADY_EXISTS(400, "JDBC-INTEGRATION-CONNECTOR-400-004",
+ "Glossary category {0} already exists in Apache Atlas",
+ "The connector attempts to add a numerical post-fix to the category name to ensure it has a unique name.",
+ "No action is required. The connector will validate whether it has already created the category on another thread, or it will try the request with a new name."),
+
+ /**
+ * JDBC-INTEGRATION-CONNECTOR-400-005 - Glossary term {0} already exists in Apache Atlas
+ */
+ TERM_ALREADY_EXISTS(400, "JDBC-INTEGRATION-CONNECTOR-400-005",
+ "Glossary term {0} already exists in Apache Atlas",
+ "The connector attempts to add a numerical post-fix to the term name to ensure it has a unique name.",
+ "No action is required. The connector will validate whether it has already created the term on another thread, or it will try the request with a new name."),
+
+
+ /**
+ * JDBC-INTEGRATION-CONNECTOR-0036 - The {0} integration connector can not retrieve the correlation information for (1} open metadata entity {2} linked in Apache Atlas {3} to {4} entity {5}
+ */
+ MISSING_CORRELATION(404, "JDBC-INTEGRATION-CONNECTOR-404-001",
+ "The {0} integration connector can not retrieve the correlation information for (1} open metadata entity {2} linked in Apache Atlas {3} to {4} entity {5}",
+ "The correlation information that should be associated with the open metadata entity is missing and the integration connector is not able to confidently synchronize it with the Apache Atlas entity.",
+ "Review the audit log to determine if there were errors detected when the open metadata entity was created. The simplest resolution is to delete the open metadata entity. However, if this entity has been enhanced with many attachments and classifications then it is also possible to add the correlation information to the open metadata entity to allow the synchronization to continue."),
+
+ /**
+ * JDBC-INTEGRATION-CONNECTOR-500-001 - The {0} integration connector received an unexpected exception {1} during method {2}; the error message was: {3}
+ */
+ UNEXPECTED_EXCEPTION(500, "JDBC-INTEGRATION-CONNECTOR-500-001",
+ "The {0} integration connector received an unexpected exception {1} during method {2}; the error message was: {3}",
+ "The connector is unable to catalog one or more metadata elements.",
+ "Use the details from the error message to determine the cause of the error and retry the request once it is resolved."),
+
+ /**
+ * JDBC-INTEGRATION-CONNECTOR-503-001 - A client-side exception {0} was received from API call {1} to URL {2}. The error message was {3}
+ */
+ CLIENT_SIDE_REST_API_ERROR(503, "JDBC-INTEGRATION-CONNECTOR-503-001",
+ "A client-side exception of {0} was received from API call {1} to URL {2}. The error message was {3}",
+ "The integration has issued a call to the open metadata access service REST API in a remote server and has received an exception from the local client libraries.",
+ "Look for errors in the local server's console to understand and correct the source of the error."),
+
+ ;
+
+ private final ExceptionMessageDefinition messageDefinition;
+
+
+ /**
+ * The constructor for JDBCErrorCode expects to be passed one of the enumeration rows defined in
+ * JDBCErrorCode above. For example:
+ *
+ * JDBCErrorCode errorCode = JDBCErrorCode.ERROR_SENDING_EVENT;
+ *
+ * This will expand out to the 5 parameters shown below.
+ *
+ * @param httpErrorCode error code to use over REST calls
+ * @param errorMessageId unique identifier for the message
+ * @param errorMessage text for the message
+ * @param systemAction description of the action taken by the system when the error condition happened
+ * @param userAction instructions for resolving the error
+ */
+ JDBCIntegrationConnectorErrorCode(int httpErrorCode, String errorMessageId, String errorMessage, String systemAction, String userAction)
+ {
+ this.messageDefinition = new ExceptionMessageDefinition(httpErrorCode,
+ errorMessageId,
+ errorMessage,
+ systemAction,
+ userAction);
+ }
+
+
+ /**
+ * Retrieve a message definition object for an exception. This method is used when there are no message inserts.
+ *
+ * @return message definition object.
+ */
+ @Override
+ public ExceptionMessageDefinition getMessageDefinition()
+ {
+ return messageDefinition;
+ }
+
+
+ /**
+ * Retrieve a message definition object for an exception. This method is used when there are values to be inserted into the message.
+ *
+ * @param params array of parameters (all strings). They are inserted into the message according to the numbering in the message text.
+ * @return message definition object.
+ */
+ @Override
+ public ExceptionMessageDefinition getMessageDefinition(String... params)
+ {
+ messageDefinition.setMessageParameters(params);
+
+ return messageDefinition;
+ }
+
+
+ /**
+ * JSON-style toString
+ *
+ * @return string of property names and values for this enum
+ */
+ @Override
+ public String toString()
+ {
+ return "JDBCErrorCode{" +
+ "messageDefinition=" + messageDefinition +
+ '}';
+ }
+}
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/customization/TransferCustomizations.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/customization/TransferCustomizations.java
index 03a60e99e7d..72c53c1c2f2 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/customization/TransferCustomizations.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/jdbc/transfer/customization/TransferCustomizations.java
@@ -157,8 +157,7 @@ private List processCustomization(Object customization) {
List processedCustomization = new ArrayList<>();
if (customization instanceof String) {
processedCustomization.add((String)customization);
- } else if (customization instanceof List>) {
- List> intermediary = (List>) customization;
+ } else if (customization instanceof List> intermediary) {
for(Object intermediaryObject : intermediary) {
if(intermediaryObject instanceof String) {
processedCustomization.add((String)intermediaryObject);
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/test/java/org/odpi/openmetadta/adapters/connectors/integration/jdbc/ffdc/AuditCodeTest.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/test/java/org/odpi/openmetadta/adapters/connectors/integration/jdbc/ffdc/AuditCodeTest.java
new file mode 100644
index 00000000000..14ce450799c
--- /dev/null
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/test/java/org/odpi/openmetadta/adapters/connectors/integration/jdbc/ffdc/AuditCodeTest.java
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Copyright Contributors to the ODPi Egeria project. */
+package org.odpi.openmetadta.adapters.connectors.integration.jdbc.ffdc;
+
+import org.odpi.openmetadata.adapters.connectors.integration.jdbc.ffdc.JDBCIntegrationConnectorAuditCode;
+import org.odpi.openmetadata.test.unittest.utilities.AuditLogMessageSetTest;
+import org.testng.annotations.Test;
+
+
+/**
+ * Verify the JDBCIntegrationConnectorAuditCode enum contains unique message ids, non-null names and descriptions and can be
+ * serialized to JSON and back again.
+ */
+public class AuditCodeTest extends AuditLogMessageSetTest
+{
+ final static String messageIdPrefix = "JDBC-INTEGRATION-CONNECTOR";
+
+ /**
+ * Validated the values of the enum.
+ */
+ @Test public void testAllAuditCodeValues()
+ {
+ for (JDBCIntegrationConnectorAuditCode errorCode : JDBCIntegrationConnectorAuditCode.values())
+ {
+ super.testSingleAuditCodeValue(errorCode, messageIdPrefix);
+ }
+ }
+}
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/test/java/org/odpi/openmetadta/adapters/connectors/integration/jdbc/ffdc/ErrorCodeTest.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/test/java/org/odpi/openmetadta/adapters/connectors/integration/jdbc/ffdc/ErrorCodeTest.java
new file mode 100644
index 00000000000..e8a94d77fa4
--- /dev/null
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/jdbc-integration-connector/src/test/java/org/odpi/openmetadta/adapters/connectors/integration/jdbc/ffdc/ErrorCodeTest.java
@@ -0,0 +1,28 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Copyright Contributors to the ODPi Egeria project. */
+package org.odpi.openmetadta.adapters.connectors.integration.jdbc.ffdc;
+
+import org.odpi.openmetadata.adapters.connectors.integration.jdbc.ffdc.JDBCIntegrationConnectorErrorCode;
+import org.odpi.openmetadata.test.unittest.utilities.ExceptionMessageSetTest;
+import org.testng.annotations.Test;
+
+
+/**
+ * Verify the JDBCIntegrationConnectorErrorCode enum contains unique message ids, non-null names and descriptions and can be
+ * serialized to JSON and back again.
+ */
+public class ErrorCodeTest extends ExceptionMessageSetTest
+{
+ final static String messageIdPrefix = "JDBC-INTEGRATION-CONNECTOR";
+
+ /**
+ * Validated the values of the enum.
+ */
+ @Test public void testAllErrorCodeValues()
+ {
+ for (JDBCIntegrationConnectorErrorCode errorCode : JDBCIntegrationConnectorErrorCode.values())
+ {
+ super.testSingleErrorCodeValue(errorCode, messageIdPrefix);
+ }
+ }
+}
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/kafka-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/kafka/KafkaMonitorIntegrationProvider.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/kafka-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/kafka/KafkaMonitorIntegrationProvider.java
index 679664f3b09..fc6b3df9331 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/kafka-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/kafka/KafkaMonitorIntegrationProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/kafka-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/kafka/KafkaMonitorIntegrationProvider.java
@@ -68,6 +68,7 @@ public KafkaMonitorIntegrationProvider()
List recognizedConfigurationProperties = new ArrayList<>();
recognizedConfigurationProperties.add(TEMPLATE_QUALIFIED_NAME_CONFIGURATION_PROPERTY);
connectorType.setRecognizedConfigurationProperties(recognizedConfigurationProperties);
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openapi-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openapis/OpenAPIMonitorIntegrationProvider.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openapi-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openapis/OpenAPIMonitorIntegrationProvider.java
index 1827e9ffdb3..652191bac40 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openapi-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openapis/OpenAPIMonitorIntegrationProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openapi-integration-connector/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openapis/OpenAPIMonitorIntegrationProvider.java
@@ -68,6 +68,7 @@ public OpenAPIMonitorIntegrationProvider()
List recognizedConfigurationProperties = new ArrayList<>();
recognizedConfigurationProperties.add(TEMPLATE_QUALIFIED_NAME_CONFIGURATION_PROPERTY);
connectorType.setRecognizedConfigurationProperties(recognizedConfigurationProperties);
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/APIBasedOpenLineageLogStoreProvider.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/APIBasedOpenLineageLogStoreProvider.java
index 97507c6861d..90ad8288cca 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/APIBasedOpenLineageLogStoreProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/APIBasedOpenLineageLogStoreProvider.java
@@ -58,6 +58,7 @@ public APIBasedOpenLineageLogStoreProvider()
connectorType.setDisplayName(connectorDisplayName);
connectorType.setDescription(connectorDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/FileBasedOpenLineageLogStoreProvider.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/FileBasedOpenLineageLogStoreProvider.java
index ad9b4c0fa4b..254d246f16e 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/FileBasedOpenLineageLogStoreProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/FileBasedOpenLineageLogStoreProvider.java
@@ -59,6 +59,7 @@ public FileBasedOpenLineageLogStoreProvider()
connectorType.setDisplayName(connectorDisplayName);
connectorType.setDescription(connectorDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/GovernanceActionOpenLineageIntegrationProvider.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/GovernanceActionOpenLineageIntegrationProvider.java
index 1e7be5df73d..05fdf475bf5 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/GovernanceActionOpenLineageIntegrationProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/GovernanceActionOpenLineageIntegrationProvider.java
@@ -60,6 +60,7 @@ public GovernanceActionOpenLineageIntegrationProvider()
connectorType.setDisplayName(connectorDisplayName);
connectorType.setDescription(connectorDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageCataloguerIntegrationProvider.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageCataloguerIntegrationProvider.java
index a36515de8a9..0605efcb538 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageCataloguerIntegrationProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageCataloguerIntegrationProvider.java
@@ -58,6 +58,7 @@ public OpenLineageCataloguerIntegrationProvider()
connectorType.setDisplayName(connectorDisplayName);
connectorType.setDescription(connectorDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
diff --git a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageEventReceiverIntegrationProvider.java b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageEventReceiverIntegrationProvider.java
index 76eafc514f4..3fbbd86ea7a 100644
--- a/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageEventReceiverIntegrationProvider.java
+++ b/open-metadata-implementation/adapters/open-connectors/integration-connectors/openlineage-integration-connectors/src/main/java/org/odpi/openmetadata/adapters/connectors/integration/openlineage/OpenLineageEventReceiverIntegrationProvider.java
@@ -61,6 +61,7 @@ public OpenLineageEventReceiverIntegrationProvider()
connectorType.setDisplayName(connectorDisplayName);
connectorType.setDescription(connectorDescription);
connectorType.setConnectorProviderClassName(this.getClass().getName());
+ connectorType.setSupportedAssetTypeName(supportedAssetTypeName);
super.connectorTypeBean = connectorType;
diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-event-topic-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/auditlogstore/eventtopic/EventTopicAuditLogStoreConnector.java b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-event-topic-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/auditlogstore/eventtopic/EventTopicAuditLogStoreConnector.java
index b2e87506953..8d77ad161cf 100644
--- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-event-topic-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/auditlogstore/eventtopic/EventTopicAuditLogStoreConnector.java
+++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/audit-log-connectors/audit-log-event-topic-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/auditlogstore/eventtopic/EventTopicAuditLogStoreConnector.java
@@ -20,6 +20,7 @@
public class EventTopicAuditLogStoreConnector extends OMRSAuditLogStoreConnectorBase implements VirtualConnectorExtension
{
private final List topicConnectors = new ArrayList<>();
+ protected List embeddedConnectors = null;
/**
@@ -77,6 +78,8 @@ public String storeLogRecord(OMRSAuditLogRecord logRecord) throws InvalidParamet
@Override
public void initializeEmbeddedConnectors(List embeddedConnectors)
{
+ this.embeddedConnectors = embeddedConnectors;
+
if (embeddedConnectors != null)
{
for (Connector embeddedConnector : embeddedConnectors)
@@ -133,14 +136,7 @@ public void disconnect() throws ConnectorCheckedException
/*
* Step through the embedded connectors and shut them down.
*/
- for (Connector topicConnector : topicConnectors)
- {
- if (topicConnector != null)
- {
- topicConnector.disconnect();
- }
- }
-
+ super.disconnectConnectors(this.embeddedConnectors);
super.disconnect();
}
}
diff --git a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/inmemory-repository-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/inmemory/repositoryconnector/InMemoryOMRSMetadataStore.java b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/inmemory-repository-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/inmemory/repositoryconnector/InMemoryOMRSMetadataStore.java
index 85226688840..5bb3001d675 100644
--- a/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/inmemory-repository-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/inmemory/repositoryconnector/InMemoryOMRSMetadataStore.java
+++ b/open-metadata-implementation/adapters/open-connectors/repository-services-connectors/open-metadata-collection-store-connectors/inmemory-repository-connector/src/main/java/org/odpi/openmetadata/adapters/repositoryservices/inmemory/repositoryconnector/InMemoryOMRSMetadataStore.java
@@ -262,7 +262,7 @@ synchronized EntityDetail createEntityInStore(EntityDetail entity) throws Reposi
private String generateGUID(String typeName,
String guid)
{
- return typeName + ":" + guid;
+ return typeName + "-" + guid;
}
@@ -1384,7 +1384,7 @@ synchronized List getRelationshipHistory(Date fromTime,
boolean oldestFirst)
{
List historyResults = new ArrayList<>();
- Date followingUpdateTime = null;
+ Date followingUpdateTime;
/*
* Do not have a relationship
diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CollectionHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CollectionHandler.java
index 36a216487f3..23fc88883a5 100644
--- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CollectionHandler.java
+++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/CollectionHandler.java
@@ -573,6 +573,16 @@ public void addMemberToCollection(String userId,
* @param memberGUID unique identifier of the element that is being added to the collection
* @param memberGUIDParameterName parameter supplying the memberGUID
* @param membershipRationale why is the element a member? (optional)
+ * @param confidence level of confidence that the membership is correct - from 0 to 100
+ * @param membershipStatus status of member
+ * @param userDefinedStatus extension to membership status values
+ * @param createdBy who created the relationship
+ * @param expression what is the expression used to characterize the membership
+ * @param source what was the source of the membership recommendation
+ * @param steward which steward is responsible for the membership
+ * @param stewardTypeName type name of the element representing the steward
+ * @param stewardPropertyName property name of the property providing the identifier for the steward (eg qualifiedName)
+ * @param notes additional notes for/from the steward
* @param effectiveFrom the time that the relationship element must be effective from (null for any time, new Date() for now)
* @param effectiveTo the time that the relationship must be effective to (null for any time, new Date() for now)
* @param isMergeUpdate should the new properties be merged with existing properties (true) or completely replace them (false)?
diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericHandler.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericHandler.java
index 19d4bcdfa06..e5f6291a82c 100644
--- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericHandler.java
+++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/OpenMetadataAPIGenericHandler.java
@@ -54,6 +54,7 @@ public class OpenMetadataAPIGenericHandler
protected RepositoryErrorHandler errorHandler;
private static final Logger log = LoggerFactory.getLogger(OpenMetadataAPIGenericHandler.class);
+ private static final String assetActionDescription = "userAssetMonitoring";
protected AuditLog auditLog;
@@ -2214,7 +2215,7 @@ private String getAnchorGUIDForConnection(String userId,
Relationship relationship = repositoryHandler.getUniqueRelationshipByType(userId,
connectionGUID,
OpenMetadataAPIMapper.CONNECTION_TYPE_NAME,
- false,
+ true,
OpenMetadataAPIMapper.ASSET_TO_CONNECTION_TYPE_GUID,
OpenMetadataAPIMapper.ASSET_TO_CONNECTION_TYPE_NAME,
forLineage,
@@ -5428,15 +5429,28 @@ public String createBeanInRepository(String userId,
effectiveTime,
methodName);
- return repositoryHandler.createEntity(userId,
- entityTypeGUID,
- entityTypeName,
- externalSourceGUID,
- externalSourceName,
- propertyBuilder.getInstanceProperties(methodName),
- propertyBuilder.getEntityClassifications(),
- propertyBuilder.getInstanceStatus(),
- methodName);
+ String entityGUID = repositoryHandler.createEntity(userId,
+ entityTypeGUID,
+ entityTypeName,
+ externalSourceGUID,
+ externalSourceName,
+ propertyBuilder.getInstanceProperties(methodName),
+ propertyBuilder.getEntityClassifications(),
+ propertyBuilder.getInstanceStatus(),
+ methodName);
+
+
+ if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataAPIMapper.ASSET_TYPE_NAME))
+ {
+ auditLog.logMessage(assetActionDescription,
+ GenericHandlersAuditCode.ASSET_ACTIVITY_CREATE.getMessageDefinition(userId,
+ entityTypeName,
+ entityGUID,
+ methodName,
+ serviceName));
+ }
+
+ return entityGUID;
}
@@ -5608,6 +5622,16 @@ public String createBeanFromTemplate(String userId,
relationshipProperties,
methodName);
+ if (repositoryHelper.isTypeOf(serviceName, entityTypeName, OpenMetadataAPIMapper.ASSET_TYPE_NAME))
+ {
+ auditLog.logMessage(assetActionDescription,
+ GenericHandlersAuditCode.ASSET_ACTIVITY_CREATE.getMessageDefinition(userId,
+ entityTypeName,
+ templateProgress.newBeanGUID,
+ methodName,
+ serviceName));
+ }
+
return templateProgress.newBeanGUID;
}
diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersAuditCode.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersAuditCode.java
index 0bcabee9230..5c0da7d1167 100644
--- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersAuditCode.java
+++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersAuditCode.java
@@ -9,7 +9,6 @@
/**
* The GenericHandlersAuditCode is used to define the message content for the OMRS Audit Log.
- *
* The 5 fields in the enum are:
*
* - Log Message Identifier - to uniquely identify the message
@@ -22,6 +21,10 @@
*/
public enum GenericHandlersAuditCode implements AuditLogMessageSet
{
+ /**
+ * OMAG-GENERIC-HANDLERS-0001 - The Open Metadata Service {0} is not able to set the Anchors classification on entity {1} of type {2} ({3}) during method {4}.
+ * The resulting exception was {5} with error message {6}
+ */
UNABLE_TO_SET_ANCHORS("OMAG-GENERIC-HANDLERS-0001",
OMRSAuditLogRecordSeverity.ERROR,
"The Open Metadata Service {0} is not able to set the Anchors classification on entity {1} of type {2} ({3}) during method {4}." +
@@ -35,12 +38,18 @@ public enum GenericHandlersAuditCode implements AuditLogMessageSet
"optimization provided through the Anchors classification, add an Egeria native metadata server to the cohort. " +
"This will provide the support for the Anchors classification."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0002 - {0} has linked {1} element {2} to external identifier {3} from third party metadata source {4} ({5}) as part of the {6} operation
+ */
SETTING_UP_EXTERNAL_ID("OMAG-GENERIC-HANDLERS-0002",
OMRSAuditLogRecordSeverity.INFO,
- "{0} has linked {1} element {2} to external identifier {3} from third party metadata source {4} ({5}) as part of the {6} operation.",
+ "{0} has linked {1} element {2} to external identifier {3} from third party metadata source {4} ({5}) as part of the {6} operation",
"The described linkage is stored in one of the connected open metadata repositories.",
"No specific action is required. This message is to highlight that the association has been made."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0003 - The permitted synchronization for {0} {1} ({2}) has changed for identifier {3} from {4} to {5}
+ */
PERMITTED_SYNC_CHANGING("OMAG-GENERIC-HANDLERS-0003",
OMRSAuditLogRecordSeverity.INFO,
"The permitted synchronization for {0} {1} ({2}) has changed for identifier {3} from {4} to {5}",
@@ -48,6 +57,9 @@ public enum GenericHandlersAuditCode implements AuditLogMessageSet
"Verify that the configuration for the integration connector supporting this third party technology " +
"has legitimately changed to the new permitted synchronization."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0004 - {0} has created a new {1} relationship between {2} {3} and {4} {5} during method {6} on behalf of external metadata manager {7} ({8})
+ */
NEW_EXTERNAL_RELATIONSHIP("OMAG-GENERIC-HANDLERS-0004",
OMRSAuditLogRecordSeverity.INFO,
"{0} has created a new {1} relationship between {2} {3} and {4} {5} during method {6} on behalf of external metadata manager {7} ({8})",
@@ -55,6 +67,9 @@ public enum GenericHandlersAuditCode implements AuditLogMessageSet
"No action is required now but this message can be useful to understand where particular relationships " +
"came from."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0005 - {0} has updated an existing {1} relationship {2} during method {3} on behalf of external metadata manager {4} ({5})
+ */
EXTERNAL_RELATIONSHIP_UPDATED("OMAG-GENERIC-HANDLERS-0005",
OMRSAuditLogRecordSeverity.INFO,
"{0} has updated an existing {1} relationship {2} during method {3} on behalf of external metadata manager {4} ({5})",
@@ -62,6 +77,9 @@ public enum GenericHandlersAuditCode implements AuditLogMessageSet
"No action is required now but this message can be useful to understand where particular relationships' " +
"values came from."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0006 - {0} has removed the {1} relationship between {2} {3} and {4} {5} during method {6} on behalf of external metadata manager {7} ({8})
+ */
EXTERNAL_RELATIONSHIP_REMOVED("OMAG-GENERIC-HANDLERS-0006",
OMRSAuditLogRecordSeverity.INFO,
"{0} has removed the {1} relationship between {2} {3} and {4} {5} during method {6} on behalf of external metadata manager {7} ({8})",
@@ -69,6 +87,10 @@ public enum GenericHandlersAuditCode implements AuditLogMessageSet
"No action is required now but this message can be useful to understand why a particular relationship " +
"has been removed."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0007 - The Open Metadata Service {0} has deleted a relationship, resulting in entity {1} of type {2} ({3}) losing its anchor.
+ * An attempt was made to delete this unanchored entity, which failed. The resulting exception was {5} with error message {6}
+ */
UNABLE_TO_DELETE_UNANCHORED_BEAN("OMAG-GENERIC-HANDLERS-0007",
OMRSAuditLogRecordSeverity.EXCEPTION,
"The Open Metadata Service {0} has deleted a relationship, resulting in entity {1} of type {2} ({3}) losing its anchor." +
@@ -78,60 +100,97 @@ public enum GenericHandlersAuditCode implements AuditLogMessageSet
"This message is to highlight that an entity has lost its anchor, and a delete was attempted on it, but failed. " +
"An administrator should assess what is required for the entity, and either delete it or supply a new anchor for it."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0008 - Ignoring unnecessary update to {0} entity with unique identifier {1} through method {2} by user {3}
+ */
IGNORING_UNNECESSARY_ENTITY_UPDATE("OMAG-GENERIC-HANDLERS-0008",
OMRSAuditLogRecordSeverity.INFO,
"Ignoring unnecessary update to {0} entity with unique identifier {1} through method {2} by user {3}",
"No update is made to the entity in the repository because the new properties are the same as the old. In order to determine that the update is unnecessary, Egeria has retrieved the existing entity from the repository and compared it to the new values.",
"Determine if the processing by Egeria is the most efficient way to detect if an update is required to the entity and make adjustments to the caller's logic if appropriate."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0009 - Ignoring unnecessary update to {0} relationship with unique identifier {1} through method {2} by user {3}
+ */
IGNORING_UNNECESSARY_RELATIONSHIP_UPDATE("OMAG-GENERIC-HANDLERS-0009",
OMRSAuditLogRecordSeverity.INFO,
"Ignoring unnecessary update to {0} relationship with unique identifier {1} through method {2} by user {3}",
"No update is made to the relationship in the repository because the new properties are the same as the old. In order to determine that the update is unnecessary, Egeria has retrieved the existing relationship from the repository and compared it to the new values.",
"Determine if the processing by Egeria is the most efficient way to detect if an update is required to the relationship and make adjustments to the caller's logic if appropriate."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0010 - Ignoring unnecessary update to {0} classification attached to entity with unique identifier {1} through method {2} by user {3}
+ */
IGNORING_UNNECESSARY_CLASSIFICATION_UPDATE("OMAG-GENERIC-HANDLERS-0010",
OMRSAuditLogRecordSeverity.INFO,
"Ignoring unnecessary update to {0} classification attached to entity with unique identifier {1} through method {2} by user {3}",
"No update is made to the classification in the repository because the new properties are the same as the old. In order to determine that the update is unnecessary, Egeria has retrieved the existing entity from the repository and compared the classification properties to the new values.",
"Determine if the processing by Egeria is the most efficient way to detect if an update is required to the classification and make adjustments to the caller's logic if appropriate."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0020 - Initializing a new governance action {0} for request type {1} to run on governance engine {2} with receivedGuards of {3}, mandatoryGuards of {4}, supplied with request parameters {5} and a start time of {6} at the request of {7}
+ */
INITIATE_GOVERNANCE_ACTION("OMAG-GENERIC-HANDLERS-0020",
OMRSAuditLogRecordSeverity.STARTUP,
"Initializing a new governance action {0} for request type {1} to run on governance engine {2} with receivedGuards of {3}, mandatoryGuards of {4}, supplied with request parameters {5} and a start time of {6} at the request of {7}",
"A new GovernanceAction entity is created. This will be picked up by the Governance Engine OMASs running in the connected cohorts and passed onto their connected engine hosts. These engine hosts will compete for the right to execute the governance action.",
"Validate that this governance action should be initialized. If so, check that the Governance Engine OMASs running in the connected cohorts publish the governance action to their connected engine host(s)."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0021 - Initializing a new governance action {0} from governance action type {1} for request type {2} to run on governance engine {3} with receivedGuards of {4}, mandatoryGuards of {5}, supplied with request parameters {6} and a start time of {7} as part of process {8}
+ */
INITIATE_GOVERNANCE_ACTION_FROM_TYPE("OMAG-GENERIC-HANDLERS-0021",
OMRSAuditLogRecordSeverity.STARTUP,
"Initializing a new governance action {0} from governance action type {1} for request type {2} to run on governance engine {3} with receivedGuards of {4}, mandatoryGuards of {5}, supplied with request parameters {6} and a start time of {7} as part of process {8}",
"A new GovernanceAction entity is created using the definition of the governance action type. This will be picked up by the Governance Engine OMASs running in the connected cohorts and passed onto their connected engine hosts. These engine hosts will compete for the right to execute the governance action.",
"Validate that this governance action should be initialized using this type. If so, check that the Governance Engine OMASs running in the connected cohorts publish the governance action to their connected engine host(s)."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0022 - Adding action target {0} ({1}) to governance action {2} ({3})
+ */
ADD_ACTION_TARGETS("OMAG-GENERIC-HANDLERS-0022",
OMRSAuditLogRecordSeverity.STARTUP,
"Adding action target {0} ({1}) to governance action {2} ({3})",
"The governance action is linked to the action target so that it is made available to the governance action service when it runs.",
"Validate that this action target should be added to the governance action."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0023 - Governance engine with {0} userId is claiming governance action {1}
+ */
ACTION_CLAIM_REQUEST("OMAG-GENERIC-HANDLERS-0023",
OMRSAuditLogRecordSeverity.STARTUP,
"Governance engine with {0} userId is claiming governance action {1}",
"The governance engine is requesting permission to execute the governance action. This will be successful if the governance engine is the first to claim the governance action and it is in APPROVED status.",
"Validate that one of the governance engines successfully claims the governance action."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0024 - Governance engine with {0} userId has successfully claimed governance action {1}
+ */
SUCCESSFUL_ACTION_CLAIM_REQUEST("OMAG-GENERIC-HANDLERS-0024",
OMRSAuditLogRecordSeverity.STARTUP,
"Governance engine with {0} userId has successfully claimed governance action {1}",
"The governance action is updated to show that the governance engine has claimed it and that its status is now WAITING. This will be successful if the governance engine is the first to claim the governance action and it is in APPROVED status.",
"Validate that only one of the governance engines successfully claims the governance action."),
+ /**
+ * OMAG-GENERIC-HANDLERS-0025 - Status changed from {0} to {1} for governance action {2} by governance engine with {3} userId
+ */
GOVERNANCE_ACTION_STATUS_CHANGE("OMAG-GENERIC-HANDLERS-0025",
OMRSAuditLogRecordSeverity.STARTUP,
"Status changed from {0} to {1} for governance action {2} by governance engine with {3} userId",
"The governance action's status has been updated as requested.",
"Validate that the status change is valid."),
+
+ /**
+ * OMAG-GENERIC-HANDLERS-0026 - User {0} created {1} asset {2} during operation {3} of service {4}
+ */
+ ASSET_ACTIVITY_CREATE("OMAG-GENERIC-HANDLERS-0026",
+ OMRSAuditLogRecordSeverity.ACTIVITY,
+ "User {0} created {1} asset {2} during operation {3} of service {4}",
+ "This message is used to capture user requests to create an asset.",
+ "No action is required, but this message can be used to capture user activity information related to asset creation."),
+
;
private final String logMessageId;
@@ -144,9 +203,9 @@ public enum GenericHandlersAuditCode implements AuditLogMessageSet
/**
* The constructor for GenericHandlersAuditCode expects to be passed one of the enumeration rows defined in
* GenericHandlersAuditCode above. For example:
- *
+ *
* GenericHandlersAuditCode auditCode = GenericHandlersAuditCode.SERVER_NOT_AVAILABLE;
- *
+ *
* This will expand out to the 4 parameters shown below.
*
* @param messageId - unique identifier for the message
diff --git a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersErrorCode.java b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersErrorCode.java
index 78ab6a77d0a..42e3e6d1561 100644
--- a/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersErrorCode.java
+++ b/open-metadata-implementation/common-services/generic-handlers/src/main/java/org/odpi/openmetadata/commonservices/generichandlers/ffdc/GenericHandlersErrorCode.java
@@ -9,7 +9,6 @@
/**
* The GenericHandlersErrorCode is used to define first failure data capture (FFDC) for errors that occur when working with
* the Repository Handler Services. It is used in conjunction with both Checked and Runtime (unchecked) exceptions.
- *
* The 5 fields in the enum are:
*
* - HTTP Error Code - for translating between REST and JAVA - Typically the numbers used are:
@@ -28,6 +27,10 @@
*/
public enum GenericHandlersErrorCode implements ExceptionMessageSet
{
+ /**
+ * OMAG-GENERIC-HANDLERS-400-001 - Service {0} is unable to process the properties supplied to method {1} because the requested owner
+ * {2} ({3}) is not a recognized software capability. The associated error message is: {4}
+ */
INTEGRATOR_NOT_RETURNED(400, "OMAG-GENERIC-HANDLERS-400-001",
"Service {0} is unable to process the properties supplied to method {1} because the requested owner {2} ({3}) is " +
"not a recognized software capability. The associated error message is: {4}",
@@ -36,6 +39,10 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"Ensure the request includes the unique identifiers for a valid software capability entity to represent " +
"the integrator and retry the request."),
+ /**
+ * OMAG-GENERIC-HANDLERS-400-002 - Service {0} is unable to process the properties supplied to method {1} because the unique name {2}
+ * given for the requested owner does not match the unique name of {3} returned in software capability {4}
+ */
BAD_INTEGRATOR_NAME(400, "OMAG-GENERIC-HANDLERS-400-002",
"Service {0} is unable to process the properties supplied to method {1} because the unique name {2} given for the " +
"requested owner does not match the unique name of {3} returned in software capability {4}",
@@ -43,6 +50,9 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"Retry the request with a matching the unique identifier and name for a valid software capability entity to " +
"represent the owner of the new instance."),
+ /**
+ * OMAG-GENERIC-HANDLERS-400-003 - Service {0} is unable to locate the external identifier {1} for the {2} ({3}) scope and {4} element {5}
+ */
UNKNOWN_EXTERNAL_IDENTITY (400, "OMAG-GENERIC-HANDLERS-400-003",
"Service {0} is unable to locate the external identifier {1} for the {2} ({3}) scope and {4} element {5}",
"The system is unable to confirm the synchronization of the element's property because the identifier " +
@@ -52,6 +62,9 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"Typically these associations are created by an integration connector running in the Catalog Integrator OMIS." +
"Look for errors reported in the hosting integration daemon."),
+ /**
+ * OMAG-GENERIC-HANDLERS-400-004 - Service {0} is unable to locate the link between the external identifier {1} for the {2} ({3}) scope and {4} element {5}
+ */
UNKNOWN_RESOURCE_LINK(400, "OMAG-GENERIC-HANDLERS-400-004",
"Service {0} is unable to locate the link between the external identifier {1} for the {2} ({3}) scope and {4} element {5}",
"The system is unable to confirm the synchronization of the element's property because the identifier " +
@@ -60,18 +73,27 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"Typically these associations are created by an integration connector running in the Catalog Integrator OMIS." +
"Look for errors reported in the hosting integration daemon."),
+ /**
+ * OMAG-GENERIC-HANDLERS-400-005 - Governance Engine with unique name of {0} is not found by calling service {1} running in server {2}
+ */
UNKNOWN_ENGINE_NAME(400, "OMAG-GENERIC-HANDLERS-400-005",
"Governance Engine with unique name of {0} is not found by calling service {1} running in server {2}",
"The system is unable to initiate a governance action because the nominated governance engine is not found in the metadata repository.",
"Investigate whether the requested name is incorrect or the definition is missing. " +
"Then retry the request once the issue is resolved."),
+ /**
+ * OMAG-GENERIC-HANDLERS-400-006 - Unable to initiate an instance of a governance action because the governance action type {0} does not have a Governance Engine linked via the {1} relationship
+ */
UNKNOWN_EXECUTOR(400, "OMAG-GENERIC-HANDLERS-400-006",
"Unable to initiate an instance of a governance action because the governance action type {0} does not have a Governance Engine linked via the {1} relationship",
"The system is unable to initiate a governance action process because is its implementation definition is incomplete.",
"Update the definition of the first governance action type so that it is linked to a governance engine to execute the requested action. " +
"Then retry the request once the definition is corrected."),
+ /**
+ * OMAG-GENERIC-HANDLERS-400-007 - Unable to initiate an instance of the {0} governance action process because there is no first governance action type defined
+ */
NO_PROCESS_IMPLEMENTATION(400, "OMAG-GENERIC-HANDLERS-400-007",
"Unable to initiate an instance of the {0} governance action process because there is no first governance action type defined",
"The system is unable to initiate a governance action process because its implementation definition is missing.",
@@ -79,6 +101,9 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"additional governance action types to this first one to describe the execution flow. " +
"Then retry the request once the definition is corrected."),
+ /**
+ * OMAG-GENERIC-HANDLERS-400-008 - The {0} {1} does not match the {2} guid {3} at end {4} in the {5} relationship identified as {6} {7}
+ */
WRONG_END_GUID(400, "OMAG-GENERIC-HANDLERS-400-008",
"The {0} {1} does not match the {2} guid {3} at end {4} in the {5} relationship identified as {6} {7}",
"The request can not be processed because one of the unique identifiers supplied on the call does not match the " +
@@ -87,18 +112,27 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"Correct the parameters and retry the request. If the values are correct then save this error message along with " +
"details of the stored metadata instances and contact the Egeria community."),
+ /**
+ * OMAG-GENERIC-HANDLERS-400-009 - Governance Engine {0} ({1}) does not support request type {2}; requested via service {3} running in server {4}
+ */
UNKNOWN_REQUEST_TYPE(400, "OMAG-GENERIC-HANDLERS-400-009",
"Governance Engine {0} ({1}) does not support request type {2}; requested via service {3} running in server {4}",
"The system is unable to initiate a governance action because the nominated request type is not found in the metadata repository.",
"Investigate whether the request type is incorrect or the definition is missing. " +
"Then retry the request once the issue is resolved."),
+ /**
+ * OMAG-GENERIC-HANDLERS-400-010 - Governance Engine {0} ({1}) does not support any request types and so it cannot run request type {2}; requested via service {3} running in server {4}
+ */
NO_REQUEST_TYPE_FOR_ENGINE(400, "OMAG-GENERIC-HANDLERS-400-010",
"Governance Engine {0} ({1}) does not support any request types and so it cannot run request type {2}; requested via service {3} running in server {4}",
"The system is unable to initiate a governance action because the nominated governance engine has no supported governance services.",
"Investigate why there are no supported governance services for the governance engine. " +
"Then retry the request once the issue is resolved."),
+ /**
+ * OMAG-GENERIC-HANDLERS-400-011 - Unable to initiate an instance of the {0} governance action process because the name is not recognized
+ */
UNKNOWN_PROCESS(400, "OMAG-GENERIC-HANDLERS-400-011",
"Unable to initiate an instance of the {0} governance action process because the name is not recognized",
"The system is unable to initiate a governance action process because its definition is missing.",
@@ -107,7 +141,7 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"Then retry the request once the definition is added."),
/**
- * OMAG-GENERIC-HANDLERS-400-012 At least one of the properties supplied for a new relationship of type {0} are invalid. The {1} exception was returned with error message: {2}
+ * OMAG-GENERIC-HANDLERS-400-012 - At least one of the properties supplied for a new relationship of type {0} are invalid. The {1} exception was returned with error message: {2}
*/
BAD_PARAMETER(400, "OMAG-GENERIC-HANDLERS-400-012",
"At least one of the properties supplied for a new relationship of type {0} are invalid. The {1} exception was returned with error message: {2}",
@@ -115,6 +149,10 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"Correct the caller's logic so that the properties passed are correctly formatted and retry the request."),
+ /**
+ * OMAG-GENERIC-HANDLERS-403-001 - The {0} method is unable to delete the requested relationship between {1} {2} and {3} {4} because it
+ * was not created by the requesting user {5}
+ */
ONLY_CREATOR_CAN_DELETE(403, "OMAG-GENERIC-HANDLERS-403-001",
"The {0} method is unable to delete the requested relationship between {1} {2} and {3} {4} because it " +
"was not created by the requesting user {5}",
@@ -122,6 +160,9 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"Retry the request with a relationship created with this user, or request that the user who created " +
"the relationship issues the delete request."),
+ /**
+ * OMAG-GENERIC-HANDLERS-403-002 - Engine Host OMAG Server with a userId of {0} is not allowed to issue request {1} for governance action {2} because it is already being processed by Engine Host OMAG Server with a userId of {3}
+ */
INVALID_PROCESSING_USER(403, "OMAG-GENERIC-HANDLERS-403-002",
"Engine Host OMAG Server with a userId of {0} is not allowed to issue request {1} for governance action {2} because it is already being processed by Engine Host OMAG Server with a userId of {3}",
"The system is unable to update a governance action because the requester has not claimed the governance action.",
@@ -130,48 +171,74 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"validate that the governance action is processed successful by the victorious engine host. If this happens frequently, it may be necessary to " +
"separate the workload amongst distinct governance engines that support the same governance services."),
+ /**
+ * OMAG-GENERIC-HANDLERS-403-003 - Engine Host OMAG Server with a userId of {0} is not allowed claim the governance action {1} because it is already being processed by Engine Host OMAG Server with a userId of {2} and is in status {3}
+ */
INVALID_GOVERNANCE_ACTION_STATUS(403, "OMAG-GENERIC-HANDLERS-403-003",
"Engine Host OMAG Server with a userId of {0} is not allowed claim the governance action {1} because it is already being processed by Engine Host OMAG Server with a userId of {2} and is in status {3}",
"The system is unable to claim a governance action because another Engine Host OMAG Server has got there first.",
"This is a normal event if there are more than one Engine Host OMAG Server running the same governance engine."),
+ /**
+ * OMAG-GENERIC-HANDLERS-404-002 - Multiple {0} entities where found with a name of {1}: the identifiers of the returned entities are {2}; the calling method is {3}, the name parameter is {4} and the server is {5}
+ */
MULTIPLE_ENTITIES_FOUND(404, "OMAG-GENERIC-HANDLERS-404-002",
"Multiple {0} entities where found with a name of {1}: the identifiers of the returned entities are {2}; the calling method is {3}, the name parameter is {4} and the server is {5}",
"The system is unable to process a request because multiple entities have been discovered and it is unsure which entity to use.",
"Investigate why multiple entities exist. Then retry the request once the issue is resolved."),
+ /**
+ * OMAG-GENERIC-HANDLERS-404-003 - Multiple {0} entities where found by method {1}: the values of the returned entities are {2}; the starting point is {3}; the calling service is {4} and the server is {5}
+ */
MULTIPLE_BEANS_FOUND(404, "OMAG-GENERIC-HANDLERS-404-003",
"Multiple {0} entities where found by method {1}: the values of the returned entities are {2}; the starting point is {3}; the calling service is {4} and the server is {5}",
"The system is unable to process a request because multiple entities have been discovered and this is not valid.",
"Investigate why multiple entities exist. It may be because they have been contributed by different repositories. " +
"Then retry the request once the issue is resolved."),
+ /**
+ * OMAG-GENERIC-HANDLERS-404-004 - Multiple {0} relationships where found between {1} entity {2} and {3} entity {4}: the identifiers of the returned relationships are {5}; the calling method is {6} and the server is {7}
+ */
MULTIPLE_RELATIONSHIPS_FOUND(404, "OMAG-GENERIC-HANDLERS-404-004",
"Multiple {0} relationships where found between {1} entity {2} and {3} entity {4}: the identifiers of the returned relationships are {5}; the calling method is {6} and the server is {7}",
"The system is unable to process a request because multiple relationships have been discovered and it is unsure which relationship to use.",
"Investigate why multiple relationship exist. Then retry the request once the issue is resolved."),
-
-
+ /**
+ * OMAG-GENERIC-HANDLERS-500-001 - An unsupported bean class named {0} was passed to the repository services by the {1} request for
+ * open metadata access service {2} on server {3}; error message was: {4}
+ */
INVALID_BEAN_CLASS(500, "OMAG-GENERIC-HANDLERS-500-001",
"An unsupported bean class named {0} was passed to the repository services by the {1} request for open metadata access service {2} on " +
"server {3}; error message was: {4}",
"The system is unable to process the request because it is not able to instantiate the bean.",
"Correct the code that initializes the converter during server start up."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-002 - The {0} service has not implemented the {1} method in a subclass of the {2} converter class for
+ * bean class {3} and so is unable to create the bean for method {4}
+ */
MISSING_CONVERTER_METHOD(500, "OMAG-GENERIC-HANDLERS-500-002",
"The {0} service has not implemented the {1} method in a subclass of the {2} converter class for bean class {3} and so is " +
"unable to create the bean for method {4}",
"The system is unable to process the request because it is not able to populate the bean.",
"Correct the converter implementation as part of this module."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-003 - An unexpected bean class named {0} was passed to the repository services by the {1} request for
+ * open metadata access service {2} on server {3}; the expected class name is: {4}
+ */
UNEXPECTED_BEAN_CLASS(500, "OMAG-GENERIC-HANDLERS-500-003",
- "An unexpected bean class named {0} was passed to the repository services by the {1} request for" +
+ "An unexpected bean class named {0} was passed to the repository services by the {1} request for " +
"open metadata access service {2} on server {3}; " +
"the expected class name is: {4}",
"The system is unable to process the request because it is not able to support the bean's methods.",
"Correct the code that sets up the converter as part of this service."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-004 - One of the converters for the {0} service is not able to populate a bean of type {1}
+ * because a metadata instance of type {2} has not passed to method {3}
+ */
MISSING_METADATA_INSTANCE(500, "OMAG-GENERIC-HANDLERS-500-004",
"One of the converters for the {0} service is not able to populate a bean of type {1} " +
"because a metadata instance of type {2} has not passed to method {3}",
@@ -181,6 +248,10 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
" metadata instances to the converter. Alternatively, these instances may not be in the repositories " +
"(legitimately) and the converter needs to be able to handle that variation."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-005 - One of the converters for the {0} service is not able to populate a bean of type {1}
+ * because a metadata instance of type {2} was passed to method {3} instead of the expected type of {4}
+ */
BAD_INSTANCE_TYPE(500, "OMAG-GENERIC-HANDLERS-500-005",
"One of the converters for the {0} service is not able to populate a bean of type {1} " +
"because a metadata instance of type {2} was passed to method {3} instead of the expected type of {4}",
@@ -189,6 +260,9 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"The error is likely to be either in the handler code that called the converter, or more likely, " +
"in the way that the handler and the converter were initialized at server start up."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-006 - The entity for identifier {0} and {1} {2} ({3}) is null
+ */
NULL_EXTERNAL_ID_ENTITY(500, "OMAG-GENERIC-HANDLERS-500-006",
"The entity for identifier {0} and {1} {2} ({3}) is null",
"The system is unable to process the request because the handler has failed to retrieve the entity for the " +
@@ -196,6 +270,9 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"The error is likely to be either in the handler code or the integration connector that is managing the exchange" +
"of metadata for ."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-007 - The entity for identifier {0} supplied on the {1} parameter by the {2} service on method {3} is null
+ */
MISSING_GOVERNANCE_ACTION(500, "OMAG-GENERIC-HANDLERS-500-007",
"The entity for identifier {0} supplied on the {1} parameter by the {2} service on method {3} is null",
"The system is unable to process the request because the handler has failed to retrieve the entity for the " +
@@ -203,6 +280,9 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"The error is likely to be in one of the repository connectors, but it may be either in the handler code " +
"or the governance engines managing the governance action entities."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-008 - The entity for identifier {0} supplied on the {1} parameter by the {2} service on method {3} has null properties
+ */
MISSING_GOVERNANCE_ACTION_PROPERTIES(500, "OMAG-GENERIC-HANDLERS-500-008",
"The entity for identifier {0} supplied on the {1} parameter by the {2} service on method {3} has null properties",
"The system is unable to process the request because the handler has retrieved a governance action entity " +
@@ -210,23 +290,35 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"The error is likely to be in one of the repository connectors " +
"or the governance engines managing the governance action entities."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-009 - An anchor GUID of "unknown" has been passed to local method {0} by the {1} service through method {2}
+ */
UNKNOWN_ANCHOR_GUID(500, "OMAG-GENERIC-HANDLERS-500-009",
"An anchor GUID of has been passed to local method {0} by the {1} service through method {2}",
"The system is unable to process the request because the handler has an invalid anchor GUID.",
"Gather diagnostics and add them to issue #4680."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-010 - A null anchor GUID has been passed to local method {0} by the {1} service through method {2}
+ */
NULL_ANCHOR_GUID(500, "OMAG-GENERIC-HANDLERS-500-010",
"A null anchor GUID has been passed to local method {0} by the {1} service through method {2}",
"The system is unable to process the request because the handler has a null anchor GUID.",
"This typically means the caller has either been returned an entity with a null GUID or there is an error" +
"in the templated create logic. Use the stack trace to determine the source of the error"),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-011 - An entity has been retrieved by method {0} from service {1} that has an invalid header: {2}
+ */
BAD_ENTITY(500, "OMAG-GENERIC-HANDLERS-500-011",
"An entity has been retrieved by method {0} from service {1} that has an invalid header: {2}",
"The system is unable to format all or part of the response because the repositories have returned an invalid entity.",
"Use knowledge of the request and the contents of the repositories to track down and correct the invalid entity. " +
"There is probably an error in the implementation of the repository that originated the entity."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-012 - A relationship {0} has been retrieved by method {1} from service {2} that has an invalid entity proxy at end {3}: {4}
+ */
BAD_ENTITY_PROXY(500, "OMAG-GENERIC-HANDLERS-500-012",
"A relationship {0} has been retrieved by method {1} from service {2} that has an invalid entity proxy at end {3}: {4}",
"The system is unable to format all or part of the response because the repositories have returned a relationship with an " +
@@ -234,6 +326,9 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
"Use knowledge of the request and the contents of the repositories to track down and correct the relationship with the " +
"invalid entity proxy. There is probably an error in the implementation of the repository that originated the relationship."),
+ /**
+ * OMAG-GENERIC-HANDLERS-500-013 - A relationship has been retrieved by method {0} from service {1} that has an invalid header: {2}
+ */
BAD_RELATIONSHIP(500, "OMAG-GENERIC-HANDLERS-500-013",
"A relationship has been retrieved by method {0} from service {1} that has an invalid header: {2}",
"The system is unable to format all or part of the response because the repositories have returned an invalid relationship.",
@@ -248,9 +343,9 @@ public enum GenericHandlersErrorCode implements ExceptionMessageSet
/**
* The constructor for GenericHandlersErrorCode expects to be passed one of the enumeration rows defined in
* DiscoveryEngineErrorCode above. For example:
- *
+ *
* GenericHandlersErrorCode errorCode = GenericHandlersErrorCode.ASSET_NOT_FOUND;
- *
+ *
* This will expand out to the 5 parameters shown below.
*
* @param httpErrorCode error code to use over REST calls
diff --git a/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/build.gradle b/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/build.gradle
index 5b12c67c3a5..17f314fb1bd 100644
--- a/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/build.gradle
+++ b/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/build.gradle
@@ -6,7 +6,9 @@
dependencies {
compileOnly 'com.fasterxml.jackson.core:jackson-annotations'
+ implementation project(':open-metadata-implementation:frameworks:audit-log-framework')
implementation project(':open-metadata-implementation:frameworks:open-connector-framework')
+ implementation project(':open-metadata-implementation:repository-services:repository-services-apis')
}
description = 'Metadata Security APIs'
diff --git a/open-metadata-implementation/common-services/metadata-security/metadata-security-connectors/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityAuditCode.java b/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityAuditCode.java
similarity index 71%
rename from open-metadata-implementation/common-services/metadata-security/metadata-security-connectors/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityAuditCode.java
rename to open-metadata-implementation/common-services/metadata-security/metadata-security-apis/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityAuditCode.java
index c0998462655..c41b338c35a 100644
--- a/open-metadata-implementation/common-services/metadata-security/metadata-security-connectors/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityAuditCode.java
+++ b/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityAuditCode.java
@@ -9,7 +9,6 @@
/**
* The OpenMetadataSecurityAuditCode is used to define the message content for the OMRS Audit Log.
- *
* The 5 fields in the enum are:
*
* - Log Message Identifier - to uniquely identify the message
@@ -22,12 +21,18 @@
*/
public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
{
+ /**
+ * OPEN-METADATA-SECURITY-0001 - The Open Metadata Security Service {0} for OMAG Server Platform {1} is initializing
+ */
PLATFORM_INITIALIZING("OPEN-METADATA-SECURITY-0001",
OMRSAuditLogRecordSeverity.STARTUP,
"The Open Metadata Security Service {0} for OMAG Server Platform {1} is initializing",
"The local server has started up a new instance of the Open Metadata Platform Security Service Connector.",
"No action is required. This is part of the normal operation of the service."),
+ /**
+ * OPEN-METADATA-SECURITY-0002 - The Open Metadata Security Service {0} for OMAG Server Platform {1} is shutting down
+ */
PLATFORM_SHUTDOWN("OPEN-METADATA-SECURITY-0002",
OMRSAuditLogRecordSeverity.SHUTDOWN,
"The Open Metadata Security Service {0} for OMAG Server Platform {1} is shutting down",
@@ -35,18 +40,27 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"No action is required. This is part of the normal operation of the service."),
+ /**
+ * OPEN-METADATA-SECURITY-0003 - The Open Metadata Security Service {0} for server {1} is initializing
+ */
SERVICE_INITIALIZING("OPEN-METADATA-SECURITY-0003",
OMRSAuditLogRecordSeverity.STARTUP,
"The Open Metadata Security Service {0} for server {1} is initializing",
"The local server has started up a new instance of the Open Metadata Server Security Service Connector.",
"No action is required. This is part of the normal operation of the service."),
+ /**
+ * OPEN-METADATA-SECURITY-0004 - The Open Metadata Security Service {0} for server {1} is shutting down
+ */
SERVICE_SHUTDOWN("OPEN-METADATA-SECURITY-0004",
OMRSAuditLogRecordSeverity.SHUTDOWN,
"The Open Metadata Security Service {0} for server {1} is shutting down",
"The local administrator has requested shut down of the Open Metadata Server Security Service Connector.",
"No action is required. This is part of the normal operation of the service."),
+ /**
+ * OPEN-METADATA-SECURITY-0005 - User {0} is not authorized to issue a request to this OMAG Server Platform
+ */
UNAUTHORIZED_PLATFORM_ACCESS("OPEN-METADATA-SECURITY-0005",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to issue a request to this OMAG Server Platform",
@@ -54,6 +68,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0006 - User {0} is not authorized to issue a request to server {1}
+ */
UNAUTHORIZED_SERVER_ACCESS("OPEN-METADATA-SECURITY-0006",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to issue a request to server {1}",
@@ -62,6 +79,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0007 - User {0} is not authorized to issue {1} requests for service {2} on server {3}
+ */
UNAUTHORIZED_SERVICE_ACCESS("OPEN-METADATA-SECURITY-0007",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to issue {1} requests for service {2} on server {3}",
@@ -69,6 +89,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0008 - User {0} is not authorized to attach feedback to asset {1}
+ */
UNAUTHORIZED_ASSET_FEEDBACK("OPEN-METADATA-SECURITY-0008",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to attach feedback to asset {1}",
@@ -76,6 +99,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0009 - User {0} is not authorized to change the zone membership of asset {1} from {2} to {3}
+ */
UNAUTHORIZED_ZONE_CHANGE("OPEN-METADATA-SECURITY-0009",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to change the zone membership of asset {1} from {2} to {3}",
@@ -83,6 +109,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0010 - User {0} is not authorized to use connection {1}
+ */
UNAUTHORIZED_CONNECTION_ACCESS("OPEN-METADATA-SECURITY-0010",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to use connection {1}",
@@ -90,6 +119,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0011 - User {0} is not authorized to access asset {1}
+ */
UNAUTHORIZED_ASSET_ACCESS("OPEN-METADATA-SECURITY-0011",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to access asset {1}",
@@ -97,6 +129,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0012 - User {0} is not authorized to create an asset of type {1}
+ */
UNAUTHORIZED_ASSET_CREATE("OPEN-METADATA-SECURITY-0012",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to create an asset of type {1}",
@@ -104,6 +139,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this create should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0013 - User {0} is not authorized to change asset {1}
+ */
UNAUTHORIZED_ASSET_CHANGE("OPEN-METADATA-SECURITY-0013",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to change asset {1}",
@@ -111,12 +149,18 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0014 - User {0} is not authorized to change asset {1} because it has missing properties: {2}
+ */
INCOMPLETE_ASSET( "OPEN-METADATA-SECURITY-0014",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to change asset {1} because it has missing properties: {2}",
"The system is unable to process a request from the user because the asset is not correctly or completely filled out.",
"The request fails with a UserNotAuthorizedException exception."),
+ /**
+ * OPEN-METADATA-SECURITY-0015 - User {0} is not authorized to access open metadata type {1} ({2}) on server {3}
+ */
UNAUTHORIZED_TYPE_ACCESS("OPEN-METADATA-SECURITY-0015",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to access open metadata type {1} ({2}) on server {3}",
@@ -124,6 +168,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0016 - User {0} is not authorized to change open metadata type {1} ({2}) on server {3}
+ */
UNAUTHORIZED_TYPE_CHANGE("OPEN-METADATA-SECURITY-0016",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to change open metadata type {1} ({2}) on server {3}",
@@ -131,6 +178,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0017 - User {0} is not authorized to create an open metadata instance of type {1} on server {2}
+ */
UNAUTHORIZED_INSTANCE_CREATE("OPEN-METADATA-SECURITY-0017",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to create an open metadata instance of type {1} on server {2}",
@@ -138,6 +188,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0018 - User {0} is not authorized to access open metadata instance {1} of type {2} on server {3}
+ */
UNAUTHORIZED_INSTANCE_ACCESS("OPEN-METADATA-SECURITY-0018",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to access open metadata instance {1} of type {2} on server {3}",
@@ -145,6 +198,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0019 - User {0} is not authorized to change open metadata type {1} of type {2} on server {3} using method {4}
+ */
UNAUTHORIZED_INSTANCE_CHANGE("OPEN-METADATA-SECURITY-0019",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to change open metadata type {1} of type {2} on server {3} using method {4}",
@@ -152,6 +208,9 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0020 - User {0} is not authorized to issue operation {1} on glossary {2}
+ */
UNAUTHORIZED_GLOSSARY_ACCESS("OPEN-METADATA-SECURITY-0020",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to issue operation {1} on glossary {2}",
@@ -159,12 +218,73 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
"Review the security policies and settings to determine if this access to a glossary should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
+ /**
+ * OPEN-METADATA-SECURITY-0021 - User {0} is not authorized to iss operation {1} because the glossary is null
+ */
NULL_GLOSSARY("OPEN-METADATA-SECURITY-0021",
OMRSAuditLogRecordSeverity.SECURITY,
"User {0} is not authorized to iss operation {1} because the glossary is null",
"The system is unable to process a request from the user because the glossary element is not correctly anchored on a glossary.",
"The request fails with a UserNotAuthorizedException exception. Add the anchor relationship of the glossary element to its glossary and corresponding Anchors classification. When both are in place, re-run the request."),
+ /**
+ * OPEN-METADATA-SECURITY-0050 - User {0} retrieved {1} asset {2} during operation {3} of service {4}
+ */
+ ASSET_ACTIVITY_READ("OPEN-METADATA-SECURITY-0050",
+ OMRSAuditLogRecordSeverity.ACTIVITY,
+ "User {0} retrieved {1} asset {2} during operation {3} of service {4}",
+ "This message is used to capture user requests to receive an asset.",
+ "No action is required, but this message can be used to capture user activity information."),
+
+
+ /**
+ * OPEN-METADATA-SECURITY-0051 - User {0} retrieved an attachment to {1} asset {2} during operation {3} of service {4}
+ */
+ ASSET_ACTIVITY_READ_ATTACHMENT("OPEN-METADATA-SECURITY-0051",
+ OMRSAuditLogRecordSeverity.ACTIVITY,
+ "User {0} retrieved an attachment to {1} asset {2} during operation {3} of service {4}",
+ "This message is used to capture user requests to receive full details about an asset.",
+ "No action is required, but this message can be used to capture user activity information about the use of assets."),
+
+
+ /**
+ * OPEN-METADATA-SECURITY-0052 - User {0} updated an attachment to {1} asset {2} during operation {3} of service {4}
+ */
+ ASSET_ACTIVITY_UPDATE_ATTACHMENT("OPEN-METADATA-SECURITY-0052",
+ OMRSAuditLogRecordSeverity.ACTIVITY,
+ "User {0} updated an attachment to {1} asset {2} during operation {3} of service {4}",
+ "This message is used to capture user requests to build out the knowledge for an asset.",
+ "No action is required, but this message can be used to capture user activity information related to curation of an asset."),
+
+
+ /**
+ * OPEN-METADATA-SECURITY-0053 - User {0} updated feedback related to {1} asset {2} during operation {3} of service {4}
+ */
+ ASSET_ACTIVITY_UPDATE_FEEDBACK("OPEN-METADATA-SECURITY-0053",
+ OMRSAuditLogRecordSeverity.ACTIVITY,
+ "User {0} updated feedback related to {1} asset {2} during operation {3} of service {4}",
+ "This message is used to capture user requests to maintain feedback on an asset.",
+ "No action is required, but this message can be used to capture user activity information related to the maintenance of feedback attached to an asset."),
+
+ /**
+ * OPEN-METADATA-SECURITY-0054 - User {0} updated {1} asset {2} during operation {3} of service {4}
+ */
+ ASSET_ACTIVITY_UPDATE("OPEN-METADATA-SECURITY-0054",
+ OMRSAuditLogRecordSeverity.ACTIVITY,
+ "User {0} updated {1} asset {2} during operation {3} of service {4}",
+ "This message is used to capture user requests to update an asset.",
+ "No action is required, but this message can be used to capture user activity information related to asset updates."),
+
+ /**
+ * OPEN-METADATA-SECURITY-0055 - User {0} deleted {1} asset {2} during operation {3} of service {4}
+ */
+ ASSET_ACTIVITY_DELETE("OPEN-METADATA-SECURITY-0055",
+ OMRSAuditLogRecordSeverity.ACTIVITY,
+ "User {0} deleted {1} asset {2} during operation {3} of service {4}",
+ "This message is used to capture user requests to delete an asset.",
+ "No action is required, but this message can be used to capture user activity information related to asset deletion."),
+
+ ;
;
@@ -176,11 +296,11 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
/**
- * The constructor for DiscoveryEngineAuditCode expects to be passed one of the enumeration rows defined in
- * DiscoveryEngineAuditCode above. For example:
- *
- * DiscoveryEngineAuditCode auditCode = DiscoveryEngineAuditCode.SERVER_NOT_AVAILABLE;
- *
+ * The constructor for OpenMetadataSecurityAuditCode expects to be passed one of the enumeration rows defined in
+ * OpenMetadataSecurityAuditCode above. For example:
+ *
+ * OpenMetadataSecurityAuditCode auditCode = OpenMetadataSecurityAuditCode.SERVER_NOT_AVAILABLE;
+ *
* This will expand out to the 4 parameters shown below.
*
* @param messageId - unique identifier for the message
@@ -203,8 +323,6 @@ public enum OpenMetadataSecurityAuditCode implements AuditLogMessageSet
}
-
-
/**
* Retrieve a message definition object for logging. This method is used when there are no message inserts.
*
diff --git a/open-metadata-implementation/common-services/metadata-security/metadata-security-connectors/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityErrorCode.java b/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityErrorCode.java
similarity index 85%
rename from open-metadata-implementation/common-services/metadata-security/metadata-security-connectors/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityErrorCode.java
rename to open-metadata-implementation/common-services/metadata-security/metadata-security-apis/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityErrorCode.java
index 420d445646e..d03a7a8e4a6 100644
--- a/open-metadata-implementation/common-services/metadata-security/metadata-security-connectors/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityErrorCode.java
+++ b/open-metadata-implementation/common-services/metadata-security/metadata-security-apis/src/main/java/org/odpi/openmetadata/metadatasecurity/ffdc/OpenMetadataSecurityErrorCode.java
@@ -9,7 +9,6 @@
/**
* The OpenMetadataSecurityErrorCode is used to define first failure data capture (FFDC) for errors that occur when
* working with open metadata security connectors.
- *
* The 5 fields in the enum are:
*
* - HTTP Error Code - for translating between REST and JAVA Typically the numbers used are:
@@ -28,16 +27,25 @@
*/
public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
{
+ /**
+ * OMAG-PLATFORM-SECURITY-400-001 - The OMAG server platform has been configured with a bad connection to its platform security connector. Error message is {0}. Connection is {1}
+ */
BAD_PLATFORM_SECURITY_CONNECTION(400, "OMAG-PLATFORM-SECURITY-400-001",
"The OMAG server platform has been configured with a bad connection to its platform security connector. Error message is {0}. Connection is {1}",
"The system is unable to validate the users issuing platform requests.",
"Review the error message to determine the cause of the problem."),
+ /**
+ * OMAG-PLATFORM-SECURITY-400-002 - The OMAG server {0} has been configured with a bad connection to its security connector. Error message is {1}. Connection is {2}
+ */
BAD_SERVER_SECURITY_CONNECTION(400, "OMAG-PLATFORM-SECURITY-400-002",
"The OMAG server {0} has been configured with a bad connection to its security connector. Error message is {1}. Connection is {2}",
"The system is unable to validate the users issuing requests to this server.",
"Review the error message to determine the cause of the problem."),
+ /**
+ * OMAG-PLATFORM-SECURITY-403-001 - User {0} is not authorized to issue request to {1}
+ */
UNAUTHORIZED_PLATFORM_ACCESS(403, "OMAG-PLATFORM-SECURITY-403-001",
"User {0} is not authorized to issue request to {1}",
"The system is unable to process a request from the user because they do not have access to the requested platform" +
@@ -46,6 +54,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"configuration error and re-run the request, if it is a valid request; otherwise contact your security " +
"team."),
+ /**
+ * OMAG-SERVER-SECURITY-403-002 - User {0} is not authorized to issue a request to server {1}
+ */
UNAUTHORIZED_SERVER_ACCESS(403, "OMAG-SERVER-SECURITY-403-002",
"User {0} is not authorized to issue a request to server {1}",
"The system is unable to process a request from the user because they do not have access to the requested " +
@@ -55,6 +66,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"came from to determine if the system is under attack, or it was a mistake, or the user's tool is not " +
"configured to connect to the correct server."),
+ /**
+ * OMAG-SERVER-SECURITY-403-003 - User {0} is not authorized to issue {1} requests
+ */
UNAUTHORIZED_SERVICE_ACCESS(403, "OMAG-SERVER-SECURITY-403-003",
"User {0} is not authorized to issue {1} requests",
"The system is unable to process a request from the user because they do not have access to the " +
@@ -64,6 +78,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"have access, investigate where the request came from to determine if the system is under attack, or it was a" +
" mistake."),
+ /**
+ * OMAG-SERVER-SECURITY-403-004 - User {0} is not authorized to attach feedback to asset {1}
+ */
UNAUTHORIZED_ASSET_FEEDBACK(403, "OMAG-SERVER-SECURITY-403-004",
"User {0} is not authorized to attach feedback to asset {1}",
"The system is unable to process a request from the user because they do not have access to augment the " +
@@ -71,6 +88,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"Using information about the asset and the user, determine if this result is expected, or if the configuration needs " +
"to be adjusted to allow this user to perform the request."),
+ /**
+ * OMAG-SERVER-SECURITY-403-005 - User {0} is not authorized to change the zone membership for asset {1} from {2} to {3}
+ */
UNAUTHORIZED_ZONE_CHANGE(403, "OMAG-SERVER-SECURITY-403-005",
"User {0} is not authorized to change the zone membership for asset {1} from {2} to {3}",
"The system is unable to process a request from the user because they do not have access to update " +
@@ -78,6 +98,10 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"Using information about the asset, the zones and the user, determine if this result is expected, " +
"or if the configuration needs to be adjusted to allow this user to perform the request."),
+
+ /**
+ * OMAG-SERVER-SECURITY-403-006 - User {0} is not authorized to access connection {1}
+ */
UNAUTHORIZED_CONNECTION_ACCESS(403, "OMAG-SERVER-SECURITY-403-006",
"User {0} is not authorized to access connection {1}",
"The system is unable to process a request from the user because they do not have access to the" +
@@ -85,6 +109,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"Using knowledge about the connection and the user, determine if this result is expected, " +
"or if the configuration needs to be adjusted to allow this user to perform the request."),
+ /**
+ * OMAG-SERVER-SECURITY-403-007 - User {0} is not authorized to access asset {1}
+ */
UNAUTHORIZED_ASSET_ACCESS(403, "OMAG-SERVER-SECURITY-403-007",
"User {0} is not authorized to access asset {1}",
"The system is unable to process a request from the user because they do not have access to the " +
@@ -92,6 +119,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"Using knowledge about the user and the asset, determine if this is the correct result or " +
"the configuration needs to be changed to allow access."),
+ /**
+ * OMAG-SERVER-SECURITY-403-008 - User {0} is not authorized to create an asset of type {1}
+ */
UNAUTHORIZED_ASSET_CREATE(403, "OMAG-SERVER-SECURITY-403-008",
"User {0} is not authorized to create an asset of type {1}",
"The system is unable to process a request from the user because they do not have authority to create " +
@@ -99,6 +129,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"Using knowledge about the user and the asset, determine if this is the correct result or " +
"the configuration needs to be changed to allow the user to create the asset."),
+ /**
+ * OMAG-SERVER-SECURITY-403-009 - User {0} is not authorized to change asset {1}
+ */
UNAUTHORIZED_ASSET_CHANGE(403, "OMAG-SERVER-SECURITY-403-009",
"User {0} is not authorized to change asset {1}",
"The system is unable to process a request from the user because they do not have access to change the " +
@@ -106,6 +139,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"Using knowledge about the user and the asset, determine if this is the correct result or " +
"the configuration needs to be changed to allow the user to update the asset."),
+ /**
+ * OMAG-SERVER-SECURITY-403-010 - User {0} is not authorized to change asset {1} because it has missing properties: {2}
+ */
INCOMPLETE_ASSET( 403, "OMAG-SERVER-SECURITY-403-010",
"User {0} is not authorized to change asset {1} because it has missing properties: {2}",
"The system is unable to process a request from the user because the asset is not correctly or completely filled out." +
@@ -113,6 +149,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"Using knowledge about the asset determine why the properties are missing and whether it needs to be " +
"updated, or that the user should not be accessing the asset."),
+ /**
+ * OMAG-SERVER-SECURITY-403-011 - User {0} is not authorized to access open metadata type {1} ({2}) on server {3}
+ */
UNAUTHORIZED_TYPE_ACCESS(403, "OMAG-SERVER-SECURITY-403-011",
"User {0} is not authorized to access open metadata type {1} ({2}) on server {3}",
"The system is unable to process a request from the user because they do not have access to the " +
@@ -121,6 +160,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"Determine if the user should be allowed access to the type information or not. If they should then " +
"change the configuration to give them access."),
+ /**
+ * OMAG-SERVER-SECURITY-403-012 - User {0} is not authorized to change open metadata type {1} ({2}) on server {3}
+ */
UNAUTHORIZED_TYPE_CHANGE(403, "OMAG-SERVER-SECURITY-403-012",
"User {0} is not authorized to change open metadata type {1} ({2}) on server {3}",
"The system is unable to process a request from the user because they do not have access to " +
@@ -129,6 +171,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"if the user is privileged to make these changes. If they are then update the configuration to grant them " +
"access."),
+ /**
+ * OMAG-SERVER-SECURITY-403-013 - User {0} is not authorized to access open metadata instance {1} of type {2} on server {3}
+ */
UNAUTHORIZED_INSTANCE_ACCESS(403, "OMAG-SERVER-SECURITY-403-013",
"User {0} is not authorized to access open metadata instance {1} of type {2} on server {3}",
"The system is unable to process a request from the user because they do not have read access to the " +
@@ -136,6 +181,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"Determine if the user should have access to this metadata instance and if they should then" +
" change the configuration to give them the required privileges."),
+ /**
+ * OMAG-SERVER-SECURITY-403-014 - User {0} is not authorized to change open metadata instance {1} of type {2} on server {3}
+ */
UNAUTHORIZED_INSTANCE_CHANGE(403, "OMAG-SERVER-SECURITY-403-014",
"User {0} is not authorized to change open metadata instance {1} of type {2} on server {3}",
"The system is unable to process a request from the user because they do not have access to " +
@@ -143,28 +191,42 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
"Determine if the user should have access to this metadata instance and if they should then " +
"change the configuration to give them the required update privileges."),
+ /**
+ * OMAG-SERVER-SECURITY-403-015 - {0} connections are connected to the asset with unique identifier {1} but there is no security connector to select a connection for user {2}; the calling method is {3}
+ */
MULTIPLE_CONNECTIONS_FOUND(403, "OMAG-SERVER-SECURITY-403-015",
"{0} connections are connected to the asset with unique identifier {1} but there is no security connector to select a connection for user {2}; the calling method is {3}",
"The system is unable to process a request because multiple connections have been discovered and it is unsure which connection to return.",
"Either add a server security connection or use a method such as getConnectionsForAsset() to page through the list of connections to select the one that is appropriate for their use case."),
+ /**
+ * OMAG-SERVER-SECURITY-403-016 - {0} connections are connected to the asset with unique identifier {1} but the user {2} is not permitted to use any of them; the calling method is {3}
+ */
NO_CONNECTIONS_ALLOWED(403, "OMAG-SERVER-SECURITY-403-016",
"{0} connections are connected to the asset with unique identifier {1} but the user {2} is not permitted to use any of them; the calling method is {3}",
"The system is unable to process a request because the calling user does not have sufficient privileges.",
"No action is required if this user should not have access to the connection. To gain access to the connection, either the security credentials of the user need changing, or a different userId is required."),
+ /**
+ * OMAG-SERVER-SECURITY-403-020 - User {0} is not authorized to issue an operation {1} on glossary {2}
+ */
UNAUTHORIZED_GLOSSARY_ACCESS(403, "OMAG-SERVER-SECURITY-403-020",
"User {0} is not authorized to issue an operation {1} on glossary {2}",
"The security service detected an unauthorized access to a glossary.",
"Review the security policies and settings to determine if this access to a glossary should be allowed or not." +
" Take action to either change the security sessions or determine the reason for the unauthorized request."),
-
+ /**
+ * OMAG-PLATFORM-SECURITY-500-001 - {0} connections are connected to the asset with unique identifier {1} but the connector selecting the connection for user {2} has returned an unrecognized connection; the calling method is {3}
+ */
UNKNOWN_CONNECTION_RETURNED(500, "OMAG-PLATFORM-SECURITY-500-001",
"{0} connections are connected to the asset with unique identifier {1} but the connector selecting the connection for user {2} has returned an unrecognized connection; the calling method is {3}",
"The system is unable to process a request because the security connector is behaving strangely.",
"Investigate and correct the behaviour of the server security connector."),
+ /**
+ * OMAG-SERVER-SECURITY-500-002 - User {0} is not authorized to iss operation {1} because the glossary is null
+ */
NULL_GLOSSARY(500, "OMAG-SERVER-SECURITY-500-002",
"User {0} is not authorized to iss operation {1} because the glossary is null",
"The system is unable to process a request from the user because the glossary element is not correctly anchored on a glossary.",
@@ -179,9 +241,9 @@ public enum OpenMetadataSecurityErrorCode implements ExceptionMessageSet
/**
* The constructor for OpenMetadataSecurityErrorCode expects to be passed one of the enumeration rows defined in
* OpenMetadataSecurityErrorCode above. For example:
- *
+ *
* OpenMetadataSecurityErrorCode errorCode = OpenMetadataSecurityErrorCode.BAD_PLATFORM_SECURITY_CONNECTION;
- *
+ *
* This will expand out to the 5 parameters shown below.
*
* @param httpErrorCode error code to use over REST calls
diff --git a/open-metadata-implementation/common-services/metadata-security/metadata-security-connectors/src/main/java/org/odpi/openmetadata/metadatasecurity/connectors/OpenMetadataPlatformSecurityConnector.java b/open-metadata-implementation/common-services/metadata-security/metadata-security-connectors/src/main/java/org/odpi/openmetadata/metadatasecurity/connectors/OpenMetadataPlatformSecurityConnector.java
index 451a5d308be..27312ee4143 100644
--- a/open-metadata-implementation/common-services/metadata-security/metadata-security-connectors/src/main/java/org/odpi/openmetadata/metadatasecurity/connectors/OpenMetadataPlatformSecurityConnector.java
+++ b/open-metadata-implementation/common-services/metadata-security/metadata-security-connectors/src/main/java/org/odpi/openmetadata/metadatasecurity/connectors/OpenMetadataPlatformSecurityConnector.java
@@ -11,7 +11,6 @@
import org.odpi.openmetadata.metadatasecurity.OpenMetadataPlatformSecurity;
import org.odpi.openmetadata.metadatasecurity.ffdc.OpenMetadataSecurityAuditCode;
import org.odpi.openmetadata.metadatasecurity.ffdc.OpenMetadataSecurityErrorCode;
-import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditLogRecordSeverity;
/**
* OpenMetadataPlatformSecurityConnector provides the base class for a connector that validates access to the
diff --git a/open-metadata-implementation/common-services/metadata-security/metadata-security-server/src/main/java/org/odpi/openmetadata/metadatasecurity/server/OpenMetadataServerSecurityVerifier.java b/open-metadata-implementation/common-services/metadata-security/metadata-security-server/src/main/java/org/odpi/openmetadata/metadatasecurity/server/OpenMetadataServerSecurityVerifier.java
index 85b8c45e30f..d0b7294e145 100644
--- a/open-metadata-implementation/common-services/metadata-security/metadata-security-server/src/main/java/org/odpi/openmetadata/metadatasecurity/server/OpenMetadataServerSecurityVerifier.java
+++ b/open-metadata-implementation/common-services/metadata-security/metadata-security-server/src/main/java/org/odpi/openmetadata/metadatasecurity/server/OpenMetadataServerSecurityVerifier.java
@@ -11,6 +11,7 @@
import org.odpi.openmetadata.frameworks.connectors.ffdc.InvalidParameterException;
import org.odpi.openmetadata.metadatasecurity.*;
import org.odpi.openmetadata.metadatasecurity.connectors.OpenMetadataServerSecurityConnector;
+import org.odpi.openmetadata.metadatasecurity.ffdc.OpenMetadataSecurityAuditCode;
import org.odpi.openmetadata.metadatasecurity.ffdc.OpenMetadataSecurityErrorCode;
import org.odpi.openmetadata.metadatasecurity.properties.AssetAuditHeader;
import org.odpi.openmetadata.metadatasecurity.properties.Asset;
@@ -118,6 +119,7 @@ public class OpenMetadataServerSecurityVerifier implements OpenMetadataRepositor
private static final String OWNER_PROPERTY_NAME_PROPERTY_NAME = "ownerPropertyName"; /* from Area 4 */
private static final String OWNER_TYPE_PROPERTY_NAME = "ownerType"; /* deprecated */
+ private static final String assetActionDescription = "userAssetMonitoring";
private OpenMetadataRepositorySecurity repositorySecurityConnector = null;
private OpenMetadataEventsSecurity eventsSecurityConnector = null;
@@ -127,7 +129,9 @@ public class OpenMetadataServerSecurityVerifier implements OpenMetadataRepositor
private OpenMetadataAssetSecurity assetSecurityConnector = null;
private OpenMetadataGlossarySecurity glossarySecurityConnector = null;
- private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler();
+ private final InvalidParameterHandler invalidParameterHandler = new InvalidParameterHandler();
+
+ private AuditLog auditLog = null;
/**
* Default constructor
@@ -153,6 +157,7 @@ synchronized public void registerSecurityValidator(String
org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection connection) throws InvalidParameterException
{
OpenMetadataServerSecurityConnector connector;
+ this.auditLog = auditLog;
try
{
@@ -281,7 +286,6 @@ private List getSupportedZones(String userId,
* Determine the appropriate setting for the asset zones depending on the content of the asset and the
* settings of both default zones and supported zones. This method is called whenever an asset's
* values are changed.
- *
* The default behavior is to keep the updated zones as they are.
*
* @param defaultZones setting of the default zones for the service
@@ -320,7 +324,6 @@ public List verifyAssetZones(List defaultZones,
/**
* Determine the appropriate setting for the asset zones depending on the content of the asset and the
* default zones. This is called whenever a new asset is created.
- *
* The default behavior is to use the default values, unless the zones have been explicitly set up,
* in which case, they are left unchanged.
*
@@ -1322,6 +1325,16 @@ public void validateUserForAssetRead(String userId,
assetSecurityConnector.validateUserForAssetRead(userId, assetBean);
}
+
+ if (auditLog != null)
+ {
+ auditLog.logMessage(assetActionDescription,
+ OpenMetadataSecurityAuditCode.ASSET_ACTIVITY_READ.getMessageDefinition(userId,
+ assetEntity.getType().getTypeDefName(),
+ assetGUID,
+ methodName,
+ serviceName));
+ }
}
@@ -1393,6 +1406,40 @@ public void validateUserForAssetAttachment(String userId,
assetSecurityConnector.validateUserForAssetRead(userId, asset);
}
}
+
+ if (auditLog != null)
+ {
+ if (isUpdate)
+ {
+ if (isFeedback)
+ {
+ auditLog.logMessage(assetActionDescription,
+ OpenMetadataSecurityAuditCode.ASSET_ACTIVITY_UPDATE_FEEDBACK.getMessageDefinition(userId,
+ assetEntity.getType().getTypeDefName(),
+ assetGUID,
+ methodName,
+ serviceName));
+ }
+ else
+ {
+ auditLog.logMessage(assetActionDescription,
+ OpenMetadataSecurityAuditCode.ASSET_ACTIVITY_UPDATE_ATTACHMENT.getMessageDefinition(userId,
+ assetEntity.getType().getTypeDefName(),
+ assetGUID,
+ methodName,
+ serviceName));
+ }
+ }
+ else
+ {
+ auditLog.logMessage(assetActionDescription,
+ OpenMetadataSecurityAuditCode.ASSET_ACTIVITY_READ_ATTACHMENT.getMessageDefinition(userId,
+ assetEntity.getType().getTypeDefName(),
+ assetGUID,
+ methodName,
+ serviceName));
+ }
+ }
}
@@ -1437,6 +1484,16 @@ public void validateUserForAssetUpdate(String userId,
assetSecurityConnector.validateUserForAssetDetailUpdate(userId, originalAsset, assetAuditHeader, updatedAsset);
}
+
+ if (auditLog != null)
+ {
+ auditLog.logMessage(assetActionDescription,
+ OpenMetadataSecurityAuditCode.ASSET_ACTIVITY_UPDATE.getMessageDefinition(userId,
+ originalAssetEntity.getType().getTypeDefName(),
+ originalAssetEntity.getGUID(),
+ methodName,
+ serviceName));
+ }
}
@@ -1466,6 +1523,16 @@ public void validateUserForAssetDelete(String userId,
assetSecurityConnector.validateUserForAssetDelete(userId, asset);
}
+
+ if (auditLog != null)
+ {
+ auditLog.logMessage(assetActionDescription,
+ OpenMetadataSecurityAuditCode.ASSET_ACTIVITY_DELETE.getMessageDefinition(userId,
+ assetEntity.getType().getTypeDefName(),
+ assetEntity.getGUID(),
+ methodName,
+ serviceName));
+ }
}
/*
diff --git a/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/AuditableServerServiceInstanceHandler.java b/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/AuditableServerServiceInstanceHandler.java
index 5eb39fd1692..47e44a1cc10 100644
--- a/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/AuditableServerServiceInstanceHandler.java
+++ b/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/AuditableServerServiceInstanceHandler.java
@@ -5,6 +5,7 @@
import org.odpi.openmetadata.commonservices.ffdc.exceptions.InvalidParameterException;
import org.odpi.openmetadata.commonservices.ffdc.exceptions.PropertyServerException;
import org.odpi.openmetadata.commonservices.ffdc.exceptions.UserNotAuthorizedException;
+import org.odpi.openmetadata.commonservices.multitenant.ffdc.OMAGServerInstanceAuditCode;
import org.odpi.openmetadata.frameworks.auditlog.AuditLog;
/**
@@ -41,10 +42,19 @@ public AuditLog getAuditLog(String userId,
UserNotAuthorizedException,
PropertyServerException
{
+ final String actionDescription = "userMonitoring";
+
AuditableServerServiceInstance instance = (AuditableServerServiceInstance) super.getServerServiceInstance(userId,
serverName,
serviceOperationName);
- return instance.getAuditLog();
+ AuditLog auditLog = instance.getAuditLog();
+
+ auditLog.logMessage(actionDescription, OMAGServerInstanceAuditCode.USER_REQUEST_ACTIVITY.getMessageDefinition(userId,
+ serviceOperationName,
+ serviceName,
+ serverName));
+
+ return auditLog;
}
}
diff --git a/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/ffdc/OMAGServerInstanceAuditCode.java b/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/ffdc/OMAGServerInstanceAuditCode.java
index 7be8cc605f0..cb4185f1952 100644
--- a/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/ffdc/OMAGServerInstanceAuditCode.java
+++ b/open-metadata-implementation/common-services/multi-tenant/src/main/java/org/odpi/openmetadata/commonservices/multitenant/ffdc/OMAGServerInstanceAuditCode.java
@@ -9,7 +9,6 @@
/**
* The OMAGServerInstanceAuditCode is used to define the message content for the OMRS Audit Log.
- *
* The 5 fields in the enum are:
*
* - Log Message Identifier - to uniquely identify the message
@@ -38,17 +37,26 @@ public enum OMAGServerInstanceAuditCode implements AuditLogMessageSet
NO_TOPIC_INFORMATION("OMAG-MULTI-TENANT-0002",
OMRSAuditLogRecordSeverity.ERROR,
"Method {0} called on behalf of the {1} service is unable to create a client-side open " +
- "metadata topic connection because the topic name is not configured in the configuration for this service.",
+ "metadata topic connection because the topic name is not configured in the configuration for this service",
"This is a configuration error and an exception is sent to the requester.",
"Correct the configuration of the access service to include the name of the topic."),
+ /**
+ * OMAG-MULTI-TENANT-0003 - User {0} issued REST API call to operation {1} of service {2} on server {3}
+ */
+ USER_REQUEST_ACTIVITY("OMAG-MULTI-TENANT-0003",
+ OMRSAuditLogRecordSeverity.ACTIVITY,
+ "User {0} issued REST API call to operation {1} of service {2} on server {3}",
+ "This message is used to capture user activity.",
+ "No action is required, but this message can be used to capture user activity information."),
+
;
- private String logMessageId;
- private OMRSAuditLogRecordSeverity severity;
- private String logMessage;
- private String systemAction;
- private String userAction;
+ private final String logMessageId;
+ private final OMRSAuditLogRecordSeverity severity;
+ private final String logMessage;
+ private final String systemAction;
+ private final String userAction;
/**
diff --git a/open-metadata-implementation/engine-services/repository-governance/repository-governance-api/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/connector/RepositoryGovernanceProvider.java b/open-metadata-implementation/engine-services/repository-governance/repository-governance-api/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/connector/RepositoryGovernanceProvider.java
index 4b1de4aff73..bc36a149068 100644
--- a/open-metadata-implementation/engine-services/repository-governance/repository-governance-api/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/connector/RepositoryGovernanceProvider.java
+++ b/open-metadata-implementation/engine-services/repository-governance/repository-governance-api/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/connector/RepositoryGovernanceProvider.java
@@ -2,25 +2,86 @@
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.openmetadata.engineservices.repositorygovernance.connector;
-import org.odpi.openmetadata.frameworks.governanceaction.GovernanceActionServiceProviderBase;
-import org.odpi.openmetadata.repositoryservices.auditlog.OMRSAuditingComponent;
+import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase;
-import java.util.ArrayList;
import java.util.List;
/**
* RepositoryGovernanceProvider implements the base class for the connector provider for a repository governance service.
*/
-public abstract class RepositoryGovernanceProvider extends GovernanceActionServiceProviderBase
+public abstract class RepositoryGovernanceProvider extends ConnectorProviderBase
{
+ /*
+ * The type name of the asset that this connector supports.
+ */
+ protected static final String supportedAssetTypeName = "RepositoryGovernanceService";
+
+ /*
+ * Additional configuration to aid choreographing this service in a Governance Action Process.
+ */
+ protected List supportedRequestTypes = null;
+ protected List supportedRequestParameters = null;
+ protected List supportedRequestSourceNames = null;
+ protected List supportedTargetActionNames = null;
+ protected List supportedGuards = null;
+
+
+ /**
+ * The request types returned are those that affect the governance action service's behaviour. Other request types may be used
+ * to call the governance action service but they result in default behaviour.
+ *
+ * @return list of request types
+ */
+ public List supportedRequestTypes()
+ {
+ return supportedRequestTypes;
+ }
+
+
+ /**
+ * The request parameters returned are used by the governance action service to control its behaviour.
+ *
+ * @return list of parameter names used if the connector is provisioning
+ */
+ public List supportedRequestParameters()
+ {
+ return supportedRequestParameters;
+ }
+
+
+ /**
+ * The request source names returned are the request source names that affect the governance action service's behaviour. Other request
+ * source names may be used in a call the governance action service but they result in default behaviour.
+ *
+ * @return list of request sources with special meaning
+ */
+ public List supportedRequestSourceNames()
+ {
+ return supportedRequestSourceNames;
+ }
+
+
/**
- * Constructor used to initialize the ConnectorProviderBase with the Java class name of the specific
- * store implementation as well as declare the parameters supported by the archive service.
+ * The action target names returned are those that affect the governance action service's behaviour. Other action target names may be used
+ * in a call the governance action service but they result in default behaviour.
+ *
+ * @return list of action target names with special meaning
*/
- public RepositoryGovernanceProvider()
+ public List supportedActionTargetNames()
{
- super();
+ return supportedTargetActionNames;
+ }
+
- super.setConnectorComponentDescription(OMRSAuditingComponent.REPOSITORY_GOVERNANCE_SERVICE_CONNECTOR);
+ /**
+ * The guards describe the output assessment from the governance action service. The list returned is the complete list of
+ * guards to expect from the governance action service. They are used when defining governance action processes that choreograph
+ * the execution of governance action services using the guards to determine the path in the process to take.
+ *
+ * @return list of guards
+ */
+ public List supportedGuards()
+ {
+ return supportedGuards;
}
}
diff --git a/open-metadata-implementation/engine-services/repository-governance/repository-governance-api/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/connector/RepositoryGovernanceServiceConnector.java b/open-metadata-implementation/engine-services/repository-governance/repository-governance-api/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/connector/RepositoryGovernanceServiceConnector.java
index ee73b9242d0..44e3a0e0ef0 100644
--- a/open-metadata-implementation/engine-services/repository-governance/repository-governance-api/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/connector/RepositoryGovernanceServiceConnector.java
+++ b/open-metadata-implementation/engine-services/repository-governance/repository-governance-api/src/main/java/org/odpi/openmetadata/engineservices/repositorygovernance/connector/RepositoryGovernanceServiceConnector.java
@@ -181,24 +181,7 @@ protected void validateContext(RepositoryGovernanceContext governanceContext) th
@Override
public synchronized void disconnect() throws ConnectorCheckedException
{
+ super.disconnectConnectors(this.embeddedConnectors);
super.disconnect();
-
- if (this.embeddedConnectors != null)
- {
- for (Connector embeddedConnector : this.embeddedConnectors)
- {
- if (embeddedConnector != null)
- {
- try
- {
- embeddedConnector.disconnect();
- }
- catch (Exception error)
- {
- // keep going
- }
- }
- }
- }
}
}
diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/RelatedMetadataElementsResponse.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/RelatedMetadataElementsResponse.java
new file mode 100644
index 00000000000..69db94c26a6
--- /dev/null
+++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-api/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/rest/RelatedMetadataElementsResponse.java
@@ -0,0 +1,138 @@
+/* SPDX-License-Identifier: Apache-2.0 */
+/* Copyright Contributors to the ODPi Egeria project. */
+
+package org.odpi.openmetadata.frameworkservices.gaf.rest;
+
+import com.fasterxml.jackson.annotation.JsonAutoDetect;
+import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement;
+import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElements;
+
+import java.util.Arrays;
+import java.util.Objects;
+
+import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
+import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
+
+
+/**
+ * RelatedMetadataElementsResponse is the response structure used on the OMAS REST API calls that return the GAF
+ * definition of the relationship (RelatedMetadataElements).
+ */
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
+public class RelatedMetadataElementsResponse extends OMAGGAFAPIResponse
+{
+ private RelatedMetadataElements element = null;
+
+
+ /**
+ * Default constructor
+ */
+ public RelatedMetadataElementsResponse()
+ {
+ super();
+ }
+
+
+ /**
+ * Copy/clone constructor
+ *
+ * @param template object to copy
+ */
+ public RelatedMetadataElementsResponse(RelatedMetadataElementsResponse template)
+ {
+ super(template);
+
+ if (template != null)
+ {
+ this.element = template.getElement();
+ }
+ }
+
+
+ /**
+ * Return the element result.
+ *
+ * @return bean
+ */
+ public RelatedMetadataElements getElement()
+ {
+ return element;
+ }
+
+
+ /**
+ * Set up the element result.
+ *
+ * @param element bean
+ */
+ public void setElement(RelatedMetadataElements element)
+ {
+ this.element = element;
+ }
+
+
+ /**
+ * JSON-style toString
+ *
+ * @return return string containing the property names and values
+ */
+ @Override
+ public String toString()
+ {
+ return "RelatedMetadataElementResponses{" +
+ "element=" + element +
+ ", exceptionClassName='" + getExceptionClassName() + '\'' +
+ ", exceptionCausedBy='" + getExceptionCausedBy() + '\'' +
+ ", actionDescription='" + getActionDescription() + '\'' +
+ ", relatedHTTPCode=" + getRelatedHTTPCode() +
+ ", exceptionErrorMessage='" + getExceptionErrorMessage() + '\'' +
+ ", exceptionErrorMessageId='" + getExceptionErrorMessageId() + '\'' +
+ ", exceptionErrorMessageParameters=" + Arrays.toString(getExceptionErrorMessageParameters()) +
+ ", exceptionSystemAction='" + getExceptionSystemAction() + '\'' +
+ ", exceptionUserAction='" + getExceptionUserAction() + '\'' +
+ ", exceptionProperties=" + getExceptionProperties() +
+ '}';
+ }
+
+
+ /**
+ * Return comparison result based on the content of the properties.
+ *
+ * @param objectToCompare test object
+ * @return result of comparison
+ */
+ @Override
+ public boolean equals(Object objectToCompare)
+ {
+ if (this == objectToCompare)
+ {
+ return true;
+ }
+ if (!(objectToCompare instanceof RelatedMetadataElementsResponse))
+ {
+ return false;
+ }
+ if (!super.equals(objectToCompare))
+ {
+ return false;
+ }
+ RelatedMetadataElementsResponse that = (RelatedMetadataElementsResponse) objectToCompare;
+ return Objects.equals(element, that.element);
+ }
+
+
+ /**
+ * Return hash code for this object
+ *
+ * @return int hash code
+ */
+ @Override
+ public int hashCode()
+ {
+ return Objects.hash(element);
+ }
+}
diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java
index 8f81d1bb204..9dc719b8834 100644
--- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java
+++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/OpenMetadataClientBase.java
@@ -363,8 +363,8 @@ public List findMetadataElementsWithString(String userId,
forLineage,
forDuplicateProcessing,
this.getEffectiveTimeAsLong(effectiveTime),
- Integer.toString(startFrom),
- Integer.toString(pageSize));
+ startFrom,
+ pageSize);
return restResult.getElementList();
}
@@ -405,7 +405,7 @@ public List getRelatedMetadataElements(String userId,
final String methodName = "getRelatedMetadataElements";
final String guidParameterName = "elementGUID";
- final String allURLTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-metadata-store/users/{2}/related-elements/{3}?startingAtEnd={4}&forLineage={5}&forDuplicateProcessing={6}&effectiveTime={7}&startFrom={8}&pageSize={9}";
+ final String allURLTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-metadata-store/users/{2}/related-elements/{3}/any-type?startingAtEnd={4}&forLineage={5}&forDuplicateProcessing={6}&effectiveTime={7}&startFrom={8}&pageSize={9}";
final String specificURLTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-metadata-store/users/{2}/related-elements/{3}/type/{4}?startingAtEnd={5}&forLineage={6}&forDuplicateProcessing={7}&effectiveTime={8}&startFrom={9}&pageSize={10}";
invalidParameterHandler.validateUserId(userId, methodName);
@@ -421,12 +421,12 @@ public List getRelatedMetadataElements(String userId,
serviceURLMarker,
userId,
elementGUID,
- Integer.toString(startingAtEnd),
+ startingAtEnd,
forLineage,
forDuplicateProcessing,
this.getEffectiveTimeAsLong(effectiveTime),
- Integer.toString(startFrom),
- Integer.toString(pageSize));
+ startFrom,
+ pageSize);
}
else
{
@@ -437,12 +437,12 @@ public List getRelatedMetadataElements(String userId,
userId,
elementGUID,
relationshipTypeName,
- Integer.toString(startingAtEnd),
+ startingAtEnd,
forLineage,
forDuplicateProcessing,
this.getEffectiveTimeAsLong(effectiveTime),
- Integer.toString(startFrom),
- Integer.toString(pageSize));
+ startFrom,
+ pageSize);
}
return restResult.getElementList();
@@ -516,8 +516,8 @@ public List findMetadataElements(String user
forLineage,
forDuplicateProcessing,
this.getEffectiveTimeAsLong(effectiveTime),
- Integer.toString(startFrom),
- Integer.toString(pageSize));
+ startFrom,
+ pageSize);
return restResult.getElementList();
}
@@ -580,13 +580,56 @@ public List findRelationshipsBetweenMetadataElements(St
forLineage,
forDuplicateProcessing,
this.getEffectiveTimeAsLong(effectiveTime),
- Integer.toString(startFrom),
- Integer.toString(pageSize));
+ startFrom,
+ pageSize);
return restResult.getElementList();
}
+ /**
+ * Retrieve the relationship using its unique identifier.
+ *
+ * @param relationshipGUID unique identifier for the relationship
+ * @param forLineage the retrieved element is for lineage processing so include archived elements
+ * @param forDuplicateProcessing the retrieved element is for duplicate processing so do not combine results from known duplicates.
+ * @param effectiveTime only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
+ *
+ * @return relationship properties
+ * @throws InvalidParameterException the unique identifier is null or not known.
+ * @throws UserNotAuthorizedException the governance action service is not able to access the element
+ * @throws PropertyServerException there is a problem accessing the metadata store
+ */
+ @Override
+ public RelatedMetadataElements getRelationshipByGUID(String userId,
+ String relationshipGUID,
+ boolean forLineage,
+ boolean forDuplicateProcessing,
+ Date effectiveTime) throws InvalidParameterException,
+ UserNotAuthorizedException,
+ PropertyServerException
+ {
+ final String methodName = "getRelationshipByGUID";
+ final String guidParameterName = "relationshipGUID";
+ final String urlTemplate = serverPlatformURLRoot + "/servers/{0}/open-metadata/framework-services/{1}/open-metadata-store/users/{2}/related-elements/relationship/{3}?forLineage={4}&forDuplicateProcessing={5}&effectiveTime={6}";
+
+ invalidParameterHandler.validateUserId(userId, methodName);
+ invalidParameterHandler.validateGUID(relationshipGUID, guidParameterName, methodName);
+
+ RelatedMetadataElementsResponse restResult = restClient.callRelatedMetadataElementGetRESTCall(methodName,
+ urlTemplate,
+ serverName,
+ serviceURLMarker,
+ userId,
+ relationshipGUID,
+ forLineage,
+ forDuplicateProcessing,
+ this.getEffectiveTimeAsLong(effectiveTime));
+
+ return restResult.getElement();
+ }
+
+
/**
* Create a new metadata element in the metadata store. The type name comes from the open metadata types.
* The selected type also controls the names and types of the properties that are allowed.
@@ -2435,7 +2478,6 @@ public void setUpValidMetadataValue(String userId,
* Create or update the valid value for a name that can be stored in a particular open metadata property name.
* This property is of type map from name to string.
* The valid value is stored in the preferredValue property of validMetadataValue.
- *
* If the typeName is null, this valid value applies to properties of this name from any open metadata type.
* If a valid value is already set up for this property (with overlapping effective dates) then the valid value is updated.
*
@@ -2480,7 +2522,6 @@ public void setUpValidMetadataMapName(String userId,
* Create or update the valid value for a name that can be stored in a particular open metadata property name.
* This property is of type map from name to string.
* The valid value is stored in the preferredValue property of validMetadataValue.
- *
* If the typeName is null, this valid value applies to properties of this name from any open metadata type.
* If a valid value is already set up for this property (with overlapping effective dates) then the valid value is updated.
*
diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java
index 4e4ec665e68..5595ac198f7 100644
--- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java
+++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-client/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/client/rest/GAFRESTClient.java
@@ -279,7 +279,40 @@ public RelatedMetadataElementsListResponse callRelatedMetadataElementsListPostRE
/**
- * Issue a GET REST call that returns a RelatedMetadataElementsListResponse object.
+ * Issue a POST REST call that returns a RelatedMetadataElementsResponse object.
+ *
+ * @param methodName name of the method being called.
+ * @param urlTemplate template of the URL for the REST API call, with place-holders for the parameters.
+ * @param requestBody object that passes additional parameters
+ * @param params a list of parameters that are slotted into the url template.
+ *
+ * @return response object
+ * @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 RelatedMetadataElementsResponse callRelatedMetadataElementsPostRESTCall(String methodName,
+ String urlTemplate,
+ Object requestBody,
+ Object... params) throws InvalidParameterException,
+ UserNotAuthorizedException,
+ PropertyServerException
+ {
+ RelatedMetadataElementsResponse restResult = this.callPostRESTCall(methodName,
+ RelatedMetadataElementsResponse.class,
+ urlTemplate,
+ requestBody,
+ params);
+
+ exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult);
+
+ return restResult;
+ }
+
+
+
+ /**
+ * Issue a GET REST call that returns a RelatedMetadataElementsResponse object.
*
* @param methodName name of the method being called.
* @param urlTemplate template of the URL for the REST API call, with place-holders for the parameters.
@@ -290,13 +323,13 @@ public RelatedMetadataElementsListResponse callRelatedMetadataElementsListPostRE
* @throws UserNotAuthorizedException the user is not authorized to make this request.
* @throws PropertyServerException the repository is not available or not working properly.
*/
- public RelatedMetadataElementsListResponse callRelatedMetadataElementsListGetRESTCall(String methodName,
- String urlTemplate,
- Object... params) throws InvalidParameterException,
- UserNotAuthorizedException,
- PropertyServerException
+ public RelatedMetadataElementsResponse callRelatedMetadataElementGetRESTCall(String methodName,
+ String urlTemplate,
+ Object... params) throws InvalidParameterException,
+ UserNotAuthorizedException,
+ PropertyServerException
{
- RelatedMetadataElementsListResponse restResult = this.callGetRESTCall(methodName, RelatedMetadataElementsListResponse.class, urlTemplate, params);
+ RelatedMetadataElementsResponse restResult = this.callGetRESTCall(methodName, RelatedMetadataElementsResponse.class, urlTemplate, params);
exceptionHandler.detectAndThrowStandardExceptions(methodName, restResult);
diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementConverter.java
index 88a7f6a83a5..4dc0599acb0 100644
--- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementConverter.java
+++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementConverter.java
@@ -80,7 +80,7 @@ public B getNewBean(Class beanClass,
super.fillOpenMetadataElement(relatedBean, entity);
- bean.setElementProperties(relatedBean);
+ bean.setElement(relatedBean);
}
return returnBean;
diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementsConverter.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementsConverter.java
index 8a5954a7f36..c421c16fe13 100644
--- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementsConverter.java
+++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/converters/RelatedElementsConverter.java
@@ -7,6 +7,7 @@
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityProxy;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.InstanceProperties;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship;
+import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.RelationshipDef;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.repositoryconnector.OMRSRepositoryHelper;
import java.lang.reflect.InvocationTargetException;
@@ -80,6 +81,12 @@ public B getNewRelationshipBean(Class beanClass,
entityProxy = relationship.getEntityTwoProxy();
bean.setElementGUIDAtEnd2(entityProxy.getGUID());
+
+ if (repositoryHelper.getTypeDefByName(serviceName, relationship.getType().getTypeDefName()) instanceof RelationshipDef relationshipDef)
+ {
+ bean.setLabelAtEnd1(relationshipDef.getEndDef1().getAttributeName());
+ bean.setLabelAtEnd2(relationshipDef.getEndDef2().getAttributeName());
+ }
}
return returnBean;
diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenMetadataStoreRESTServices.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenMetadataStoreRESTServices.java
index 8bcc68706ba..bdc31fb5ca0 100644
--- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenMetadataStoreRESTServices.java
+++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-server/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/OpenMetadataStoreRESTServices.java
@@ -5,6 +5,8 @@
import org.odpi.openmetadata.commonservices.ffdc.InvalidParameterHandler;
import org.odpi.openmetadata.commonservices.ffdc.rest.BooleanResponse;
import org.odpi.openmetadata.commonservices.ffdc.rest.NullRequestBody;
+import org.odpi.openmetadata.frameworks.governanceaction.properties.RelatedMetadataElements;
+import org.odpi.openmetadata.frameworkservices.gaf.converters.RelatedElementsConverter;
import org.odpi.openmetadata.frameworkservices.gaf.ffdc.OpenMetadataStoreAuditCode;
import org.odpi.openmetadata.frameworkservices.gaf.handlers.MetadataElementHandler;
import org.odpi.openmetadata.frameworks.governanceaction.properties.TranslationDetail;
@@ -29,6 +31,7 @@
import org.odpi.openmetadata.frameworks.governanceaction.properties.OpenMetadataElement;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.EntityDetail;
+import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.Relationship;
import org.slf4j.LoggerFactory;
import java.util.ArrayList;
@@ -602,6 +605,73 @@ public RelatedMetadataElementsListResponse findRelationshipsBetweenMetadataEleme
}
+
+ /**
+ * Retrieve the relationship using its unique identifier.
+ *
+ * @param serverName name of server instance to route request to
+ * @param serviceURLMarker the identifier of the access service (for example asset-owner for the Asset Owner OMAS)
+ * @param userId caller's userId
+ * @param relationshipGUID unique identifier for the relationship
+ * @param forLineage the retrieved element is for lineage processing so include archived elements
+ * @param forDuplicateProcessing the retrieved element is for duplicate processing so do not combine results from known duplicates.
+ * @param effectiveTime only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
+ *
+ * @return metadata element properties or
+ *
+ * InvalidParameterException the unique identifier is null or not known.
+ * UserNotAuthorizedException the governance action service is not able to access the element
+ * PropertyServerException there is a problem accessing the metadata store
+ */
+ public RelatedMetadataElementsResponse getRelationshipByGUID(String serverName,
+ String serviceURLMarker,
+ String userId,
+ String relationshipGUID,
+ boolean forLineage,
+ boolean forDuplicateProcessing,
+ long effectiveTime)
+ {
+ final String methodName = "getRelationshipByGUID";
+ final String guidParameterName = "relationshipGUID";
+
+ RESTCallToken token = restCallLogger.logRESTCall(serverName, userId, methodName);
+
+ AuditLog auditLog = null;
+ RelatedMetadataElementsResponse response = new RelatedMetadataElementsResponse();
+
+ try
+ {
+ auditLog = instanceHandler.getAuditLog(userId, serverName, methodName);
+
+ MetadataElementHandler handler = instanceHandler.getMetadataElementHandler(userId, serverName, methodName);
+
+ Relationship relationship = handler.getAttachmentLink(userId,
+ relationshipGUID,
+ guidParameterName,
+ null,
+ this.getEffectiveTimeFromLong(effectiveTime),
+ methodName);
+
+ if (relationship != null)
+ {
+ RelatedElementsConverter converter = new RelatedElementsConverter<>(handler.getRepositoryHelper(),
+ handler.getServiceName(),
+ serverName);
+ response.setElement(converter.getNewRelationshipBean(RelatedMetadataElements.class,
+ relationship,
+ methodName));
+ }
+ }
+ catch (Exception error)
+ {
+ restExceptionHandler.captureExceptions(response, error, methodName, auditLog);
+ }
+
+ restCallLogger.logRESTCallReturn(token, response.toString());
+ return response;
+ }
+
+
/**
* Create a new metadata element in the metadata store. The type name comes from the open metadata types.
* The selected type also controls the names and types of the properties that are allowed.
diff --git a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java
index bff99ffa2dd..cef52119a4a 100644
--- a/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java
+++ b/open-metadata-implementation/framework-services/gaf-metadata-management/gaf-metadata-spring/src/main/java/org/odpi/openmetadata/frameworkservices/gaf/server/spring/OpenMetadataStoreResource.java
@@ -50,7 +50,6 @@ public class OpenMetadataStoreResource
* @param effectiveTime only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
*
* @return metadata element properties or
- *
* InvalidParameterException the unique identifier is null or not known.
* UserNotAuthorizedException the governance action service is not able to access the element
* PropertyServerException there is a problem accessing the metadata store
@@ -143,7 +142,6 @@ public GUIDResponse getMetadataElementGUIDByUniqueName(@PathVariable String
* @param requestBody searchString to retrieve
*
* @return list of matching metadata elements (or null if no elements match the name) or
- *
* InvalidParameterException the qualified name is null
* UserNotAuthorizedException the governance action service is not able to access the element
* PropertyServerException there is a problem accessing the metadata store
@@ -179,12 +177,11 @@ public OpenMetadataElementsResponse findMetadataElementsWithString(@PathVariable
* @param pageSize maximum results that can be returned
*
* @return list of related elements
- *
* InvalidParameterException the unique identifier is null or not known; the relationship type is invalid
* UserNotAuthorizedException the governance action service is not able to access the elements
* PropertyServerException there is a problem accessing the metadata store
*/
- @GetMapping(path = "/related-elements/{elementGUID}")
+ @GetMapping(path = "/related-elements/{elementGUID}/any-type")
public RelatedMetadataElementListResponse getAllRelatedMetadataElements(@PathVariable String serverName,
@PathVariable String serviceURLMarker,
@@ -227,7 +224,6 @@ public RelatedMetadataElementListResponse getAllRelatedMetadataElements(@PathVar
* @param pageSize maximum results that can be returned
*
* @return list of related elements
- *
* InvalidParameterException the unique identifier is null or not known; the relationship type is invalid
* UserNotAuthorizedException the governance action service is not able to access the elements
* PropertyServerException there is a problem accessing the metadata store
@@ -314,7 +310,6 @@ public OpenMetadataElementsResponse findMetadataElements(@PathVariable String
* @param requestBody properties defining the search criteria
*
* @return a list of relationships - null means no matching relationships - or
- *
* InvalidParameterException one of the search parameters are is invalid
* UserNotAuthorizedException the governance action service is not able to access the elements
* PropertyServerException there is a problem accessing the metadata store
@@ -335,6 +330,36 @@ public RelatedMetadataElementsListResponse findRelationshipsBetweenMetadataEleme
}
+ /**
+ * Retrieve the relationship using its unique identifier.
+ *
+ * @param serverName name of server instance to route request to
+ * @param serviceURLMarker the identifier of the access service (for example asset-owner for the Asset Owner OMAS)
+ * @param userId caller's userId
+ * @param relationshipGUID unique identifier for the metadata element
+ * @param forLineage the retrieved element is for lineage processing so include archived elements
+ * @param forDuplicateProcessing the retrieved element is for duplicate processing so do not combine results from known duplicates.
+ * @param effectiveTime only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
+ *
+ * @return metadata element properties or
+ * InvalidParameterException the unique identifier is null or not known.
+ * UserNotAuthorizedException the governance action service is not able to access the element
+ * PropertyServerException there is a problem accessing the metadata store
+ */
+ @GetMapping(path = "/related-elements/relationship/{relationshipGUID}")
+
+ public RelatedMetadataElementsResponse getRelationshipByGUID(@PathVariable String serverName,
+ @PathVariable String serviceURLMarker,
+ @PathVariable String userId,
+ @PathVariable String relationshipGUID,
+ @RequestParam boolean forLineage,
+ @RequestParam boolean forDuplicateProcessing,
+ @RequestParam long effectiveTime)
+ {
+ return restAPI.getRelationshipByGUID(serverName, serviceURLMarker, userId, relationshipGUID, forLineage, forDuplicateProcessing, effectiveTime);
+ }
+
+
/**
* Create a new metadata element in the metadata store. The type name comes from the open metadata types.
* The selected type also controls the names and types of the properties that are allowed.
@@ -347,7 +372,6 @@ public RelatedMetadataElementsListResponse findRelationshipsBetweenMetadataEleme
* @param requestBody properties for the new element
*
* @return unique identifier of the new metadata element
- *
* InvalidParameterException the type name, status or one of the properties is invalid
* UserNotAuthorizedException the governance action service is not authorized to create this type of element
* PropertyServerException there is a problem with the metadata store
@@ -375,7 +399,6 @@ public GUIDResponse createMetadataElementInStore(@PathVariable String
* @param requestBody new properties
*
* @return void or
- *
* InvalidParameterException either the unique identifier or the properties are invalid in some way
* UserNotAuthorizedException the governance action service is not authorized to update this element
* PropertyServerException there is a problem with the metadata store
@@ -403,7 +426,6 @@ public VoidResponse updateMetadataElementInStore(@PathVariable String
* @param requestBody new status values - use null to leave as is
*
* @return void or
- *
* InvalidParameterException either the unique identifier or the status are invalid in some way
* UserNotAuthorizedException the governance action service is not authorized to update this element
* PropertyServerException there is a problem with the metadata store
@@ -431,7 +453,6 @@ public VoidResponse updateMetadataElementStatusInStore(@PathVariable String
* @param requestBody new status values - use null to leave as is
*
* @return void or
- *
* InvalidParameterException either the unique identifier or the status are invalid in some way
* UserNotAuthorizedException the governance action service is not authorized to update this element
* PropertyServerException there is a problem with the metadata store
@@ -458,7 +479,6 @@ public VoidResponse updateMetadataElementEffectivityInStore(@PathVariable String
* @param requestBody null request body
*
* @return void or
- *
* InvalidParameterException the unique identifier is null or invalid in some way
* UserNotAuthorizedException the governance action service is not authorized to delete this element
* PropertyServerException there is a problem with the metadata store
@@ -488,7 +508,6 @@ public VoidResponse deleteMetadataElementInStore(@PathVariable String
* classification name
*
* @return void or
- *
* InvalidParameterException the unique identifier or classification name is null or invalid in some way; properties do not match the
* valid properties associated with the classification's type definition
* UserNotAuthorizedException the governance action service is not authorized to update this element
@@ -518,7 +537,6 @@ public VoidResponse classifyMetadataElementInStore(@PathVariable String
* @param requestBody new properties for the classification
*
* @return void or
- *
* InvalidParameterException the unique identifier or classification name is null or invalid in some way; properties do not match the
* valid properties associated with the classification's type definition
* UserNotAuthorizedException the governance action service is not authorized to update this element/classification
@@ -549,7 +567,6 @@ public VoidResponse reclassifyMetadataElementInStore(@PathVariable String
* @param requestBody the dates when this element is active / inactive - null for no restriction
*
* @return void or
- *
* InvalidParameterException either the unique identifier or the status are invalid in some way
* UserNotAuthorizedException the governance action service is not authorized to update this element
* PropertyServerException there is a problem with the metadata store
@@ -578,7 +595,6 @@ public VoidResponse updateClassificationEffectivityInStore(@PathVariable String
* @param requestBody null request body
*
* @return void or
- *
* InvalidParameterException the unique identifier or classification name is null or invalid in some way
* UserNotAuthorizedException the governance action service is not authorized to remove this classification
* PropertyServerException there is a problem with the metadata store
@@ -606,7 +622,6 @@ public VoidResponse declassifyMetadataElementInStore(@PathVariable String
* @param requestBody the properties of the relationship
*
* @return unique identifier of the new relationship or
- *
* InvalidParameterException the unique identifier's of the metadata elements are null or invalid in some way; the properties are
* not valid for this type of relationship
* UserNotAuthorizedException the governance action service is not authorized to create this type of relationship
@@ -633,7 +648,6 @@ public GUIDResponse createRelatedElementsInStore(@PathVariable String
* @param requestBody new properties for the relationship
*
* @return void or
- *
* InvalidParameterException the unique identifier of the relationship is null or invalid in some way; the properties are
* not valid for this type of relationship
* UserNotAuthorizedException the governance action service is not authorized to update this relationship
@@ -662,7 +676,6 @@ public VoidResponse updateRelatedElementsInStore(@PathVariable String
* @param requestBody the dates when this element is active / inactive - null for no restriction
*
* @return void or
- *
* InvalidParameterException either the unique identifier or the status are invalid in some way
* UserNotAuthorizedException the governance action service is not authorized to update this element
* PropertyServerException there is a problem with the metadata store
@@ -689,7 +702,6 @@ public VoidResponse updateRelatedElementsEffectivityInStore(@PathVariable String
* @param requestBody null request body
*
* @return void or
- *
* InvalidParameterException the unique identifier of the relationship is null or invalid in some way
* UserNotAuthorizedException the governance action service is not authorized to delete this relationship
* PropertyServerException there is a problem with the metadata store
@@ -716,7 +728,6 @@ public VoidResponse deleteRelatedElementsInStore(@PathVariable String
* @param requestBody properties for the new incident report
*
* @return unique identifier of the resulting incident report or
- *
* InvalidParameterException null or non-unique qualified name for the incident report
* UserNotAuthorizedException this governance action service is not authorized to create an incident report
* PropertyServerException there is a problem with the metadata store
@@ -908,7 +919,6 @@ public VoidResponse setUpValidMetadataValue(@PathVariable String ser
* Create or update the valid value for a name that can be stored in a particular open metadata property name.
* This property is of type map from name to string.
* The valid value is stored in the preferredValue property of validMetadataValue.
- *
* If the typeName is null, this valid value applies to properties of this name from any open metadata type.
* If a valid value is already set up for this property (with overlapping effective dates) then the valid value is updated.
*
@@ -942,7 +952,6 @@ public VoidResponse setUpValidMetadataMapName(@PathVariable String s
* Create or update the valid value for a name that can be stored in a particular open metadata property name.
* This property is of type map from name to string.
* The valid value is stored in the preferredValue property of validMetadataValue.
- *
* If the typeName is null, this valid value applies to properties of this name from any open metadata type.
* If a valid value is already set up for this property (with overlapping effective dates) then the valid value is updated.
*
diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionServiceConnector.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionServiceConnector.java
index 0ad9f9dcc91..db1ee6fbbbf 100644
--- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionServiceConnector.java
+++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionServiceConnector.java
@@ -155,24 +155,7 @@ public void validateContext(GovernanceContext governanceContext) throws Connecto
@Override
public synchronized void disconnect() throws ConnectorCheckedException
{
+ super.disconnectConnectors(this.embeddedConnectors);
super.disconnect();
-
- if (this.embeddedConnectors != null)
- {
- for (Connector embeddedConnector : this.embeddedConnectors)
- {
- if (embeddedConnector != null)
- {
- try
- {
- embeddedConnector.disconnect();
- }
- catch (Exception error)
- {
- // keep going
- }
- }
- }
- }
}
}
diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionServiceProviderBase.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionServiceProviderBase.java
index 036eec4e2fe..932e6dcfcd6 100644
--- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionServiceProviderBase.java
+++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/GovernanceActionServiceProviderBase.java
@@ -11,6 +11,14 @@
*/
public abstract class GovernanceActionServiceProviderBase extends ConnectorProviderBase
{
+ /*
+ * The type name of the asset that this connector supports.
+ */
+ protected static final String supportedAssetTypeName = "GovernanceActionService";
+
+ /*
+ * Additional configuration to aid choreographing this service in a Governance Action Process.
+ */
protected List supportedRequestTypes = null;
protected List supportedRequestParameters = null;
protected List supportedRequestSourceNames = null;
diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/MetadataElementInterface.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/MetadataElementInterface.java
index 72c0399191e..37e4a93ada2 100644
--- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/MetadataElementInterface.java
+++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/MetadataElementInterface.java
@@ -232,6 +232,32 @@ List findRelationshipsBetweenMetadataElements(String
PropertyServerException;
+
+
+ /**
+ * Retrieve the relationship using its unique identifier.
+ *
+ * @param relationshipGUID unique identifier for the relationship
+ * @param forLineage the retrieved element is for lineage processing so include archived elements
+ * @param forDuplicateProcessing the retrieved element is for duplicate processing so do not combine results from known duplicates.
+ * @param effectiveTime only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
+ *
+ * @return relationship properties
+ * @throws InvalidParameterException the unique identifier is null or not known.
+ * @throws UserNotAuthorizedException the governance action service is not able to access the element
+ * @throws PropertyServerException there is a problem accessing the metadata store
+ */
+ RelatedMetadataElements getRelationshipByGUID(String userId,
+ String relationshipGUID,
+ boolean forLineage,
+ boolean forDuplicateProcessing,
+ Date effectiveTime) throws InvalidParameterException,
+ UserNotAuthorizedException,
+ PropertyServerException;
+
+
+
+
/**
* Create a new metadata element in the metadata store. The type name comes from the open metadata types.
* The selected type also controls the names and types of the properties that are allowed.
diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/OpenMetadataClient.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/OpenMetadataClient.java
index 901e556f256..9a59756c86c 100644
--- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/OpenMetadataClient.java
+++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/client/OpenMetadataClient.java
@@ -262,6 +262,30 @@ public abstract List findRelationshipsBetweenMetadataE
UserNotAuthorizedException,
PropertyServerException;
+
+ /**
+ * Retrieve the relationship using its unique identifier.
+ *
+ * @param relationshipGUID unique identifier for the relationship
+ * @param forLineage the retrieved element is for lineage processing so include archived elements
+ * @param forDuplicateProcessing the retrieved element is for duplicate processing so do not combine results from known duplicates.
+ * @param effectiveTime only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
+ *
+ * @return relationship properties
+ * @throws InvalidParameterException the unique identifier is null or not known.
+ * @throws UserNotAuthorizedException the governance action service is not able to access the element
+ * @throws PropertyServerException there is a problem accessing the metadata store
+ */
+ @Override
+ public abstract RelatedMetadataElements getRelationshipByGUID(String userId,
+ String relationshipGUID,
+ boolean forLineage,
+ boolean forDuplicateProcessing,
+ Date effectiveTime) throws InvalidParameterException,
+ UserNotAuthorizedException,
+ PropertyServerException;
+
+
/**
* Create a new metadata element in the metadata store. The type name comes from the open metadata types.
* The selected type also controls the names and types of the properties that are allowed.
diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElement.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElement.java
index 3c0a4ecf8a4..4376748b715 100644
--- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElement.java
+++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElement.java
@@ -27,7 +27,7 @@ public class RelatedMetadataElement extends ElementControlHeader
private Date effectiveFromTime = null;
private Date effectiveToTime = null;
private ElementProperties relationshipProperties = null;
- private OpenMetadataElement elementProperties = null;
+ private OpenMetadataElement element = null;
/**
@@ -55,7 +55,7 @@ public RelatedMetadataElement(RelatedMetadataElement template)
effectiveFromTime = template.getEffectiveFromTime();
effectiveToTime = template.getEffectiveToTime();
relationshipProperties = template.getRelationshipProperties();
- elementProperties = template.getElementProperties();
+ element = template.getElement();
}
}
@@ -172,17 +172,17 @@ public void setRelationshipProperties(ElementProperties relationshipProperties)
*
* @return related element
*/
- public OpenMetadataElement getElementProperties() { return elementProperties; }
+ public OpenMetadataElement getElement() { return element; }
/**
* Set up the properties of the related element.
*
- * @param elementProperties related element
+ * @param element related element
*/
- public void setElementProperties(OpenMetadataElement elementProperties)
+ public void setElement(OpenMetadataElement element)
{
- this.elementProperties = elementProperties;
+ this.element = element;
}
@@ -200,7 +200,7 @@ public String toString()
", effectiveFromTime=" + effectiveFromTime +
", effectiveToTime=" + effectiveToTime +
", relationshipProperties=" + relationshipProperties +
- ", elementProperties=" + elementProperties +
+ ", elementProperties=" + element +
", status=" + getStatus() +
", type=" + getType() +
", origin=" + getOrigin() +
@@ -237,7 +237,7 @@ public boolean equals(Object objectToCompare)
Objects.equals(effectiveFromTime, that.effectiveFromTime) &&
Objects.equals(effectiveToTime, that.effectiveToTime) &&
Objects.equals(relationshipProperties, that.relationshipProperties) &&
- Objects.equals(elementProperties, that.elementProperties);
+ Objects.equals(element, that.element);
}
@@ -250,6 +250,6 @@ public boolean equals(Object objectToCompare)
public int hashCode()
{
return Objects.hash(super.hashCode(), relationshipGUID, relationshipType, effectiveFromTime,
- effectiveToTime, relationshipProperties, elementProperties);
+ effectiveToTime, relationshipProperties, element);
}
}
\ No newline at end of file
diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElements.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElements.java
index 3b95c5ec77e..7ee4056dee5 100644
--- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElements.java
+++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/properties/RelatedMetadataElements.java
@@ -30,7 +30,9 @@ public class RelatedMetadataElements extends ElementControlHeader
private Date effectiveFromTime = null;
private Date effectiveToTime = null;
private ElementProperties relationshipProperties = null;
+ private String labelAtEnd1 = null;
private String elementGUIDAtEnd1 = null;
+ private String labelAtEnd2 = null;
private String elementGUIDAtEnd2 = null;
@@ -61,6 +63,8 @@ public RelatedMetadataElements(RelatedMetadataElements template)
relationshipProperties = template.getRelationshipProperties();
elementGUIDAtEnd1 = template.getElementGUIDAtEnd1();
elementGUIDAtEnd2 = template.getElementGUIDAtEnd2();
+ labelAtEnd1 = template.getLabelAtEnd1();
+ labelAtEnd2 = template.getLabelAtEnd2();
}
}
@@ -210,6 +214,50 @@ public void setElementGUIDAtEnd2(String elementGUIDAtEnd2)
}
+ /**
+ * Return the descriptive label for end 1 of the relationship.
+ *
+ * @return string name
+ */
+ public String getLabelAtEnd1()
+ {
+ return labelAtEnd1;
+ }
+
+
+ /**
+ * Set up the descriptive label for end 1 of the relationship.
+ *
+ * @param labelAtEnd1 string name
+ */
+ public void setLabelAtEnd1(String labelAtEnd1)
+ {
+ this.labelAtEnd1 = labelAtEnd1;
+ }
+
+
+ /**
+ * Return the descriptive label for end 2 of the relationship.
+ *
+ * @return string name
+ */
+ public String getLabelAtEnd2()
+ {
+ return labelAtEnd2;
+ }
+
+
+ /**
+ * Set up the descriptive label for end 2 of the relationship.
+ *
+ * @param labelAtEnd2 string name
+ */
+ public void setLabelAtEnd2(String labelAtEnd2)
+ {
+ this.labelAtEnd2 = labelAtEnd2;
+ }
+
+
/**
* Standard toString method.
*
@@ -224,7 +272,9 @@ public String toString()
", effectiveFromTime=" + effectiveFromTime +
", effectiveToTime=" + effectiveToTime +
", relationshipProperties=" + relationshipProperties +
+ ", labelAtEnd1='" + labelAtEnd1 + '\'' +
", elementGUIDAtEnd1='" + elementGUIDAtEnd1 + '\'' +
+ ", labelAtEnd2='" + labelAtEnd2 + '\'' +
", elementGUIDAtEnd2='" + elementGUIDAtEnd2 + '\'' +
", status=" + getStatus() +
", type=" + getType() +
@@ -263,7 +313,9 @@ public boolean equals(Object objectToCompare)
Objects.equals(effectiveToTime, that.effectiveToTime) &&
Objects.equals(relationshipProperties, that.relationshipProperties) &&
Objects.equals(elementGUIDAtEnd1, that.elementGUIDAtEnd1) &&
- Objects.equals(elementGUIDAtEnd2, that.elementGUIDAtEnd2);
+ Objects.equals(labelAtEnd1, that.labelAtEnd1) &&
+ Objects.equals(elementGUIDAtEnd2, that.elementGUIDAtEnd2) &&
+ Objects.equals(labelAtEnd2, that.labelAtEnd2);
}
diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PrimitiveTypePropertyValue.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PrimitiveTypePropertyValue.java
index 3c24fa3b0a2..20cd4b35524 100644
--- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PrimitiveTypePropertyValue.java
+++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PrimitiveTypePropertyValue.java
@@ -114,6 +114,15 @@ public void setPrimitiveTypeCategory(PrimitiveTypeCategory primitiveTypeCategory
* All ok so set the category
*/
this.primitiveTypeCategory = primitiveTypeCategory;
+
+ if (primitiveTypeCategory == null)
+ {
+ super.setTypeName(null);
+ }
+ else
+ {
+ super.setTypeName(primitiveTypeCategory.getName());
+ }
}
diff --git a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PropertyHelper.java b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PropertyHelper.java
index 9c9d22c25bc..a489178892b 100644
--- a/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PropertyHelper.java
+++ b/open-metadata-implementation/frameworks/governance-action-framework/src/main/java/org/odpi/openmetadata/frameworks/governanceaction/search/PropertyHelper.java
@@ -237,8 +237,7 @@ public ElementProperties addEnumProperty(ElementProperties properties,
{
resultingProperties = properties;
}
-
-
+
EnumTypePropertyValue enumTypePropertyValue = new EnumTypePropertyValue();
enumTypePropertyValue.setSymbolicName(symbolicName);
@@ -504,7 +503,7 @@ else if (mapPropertyValue instanceof Double)
resultingProperties.setProperty(mapPropertyName, primitiveTypePropertyValue);
propertyCount++;
}
- else if (mapPropertyValue instanceof List propertyAsList)
+ else if (mapPropertyValue instanceof List> propertyAsList)
{
ArrayTypePropertyValue arrayTypePropertyValue = new ArrayTypePropertyValue();
@@ -852,14 +851,12 @@ public Map getMapFromProperty(String sourceName,
{
try
{
- if (propertyValue instanceof MapTypePropertyValue)
+ if (propertyValue instanceof MapTypePropertyValue mapTypePropertyValue)
{
- MapTypePropertyValue mapTypePropertyValue = (MapTypePropertyValue) propertyValue;
-
return this.getElementPropertiesAsMap(mapTypePropertyValue.getMapValues());
}
}
- catch (Throwable error)
+ catch (Exception error)
{
throwHelperLogicError(sourceName, methodName, thisMethodName);
}
@@ -891,9 +888,8 @@ public Map getElementPropertiesAsMap(ElementProperties proper
if (actualPropertyValue != null)
{
- if (actualPropertyValue instanceof PrimitiveTypePropertyValue)
+ if (actualPropertyValue instanceof PrimitiveTypePropertyValue primitiveTypePropertyValue)
{
- PrimitiveTypePropertyValue primitiveTypePropertyValue = (PrimitiveTypePropertyValue) actualPropertyValue;
resultingMap.put(mapPropertyName, primitiveTypePropertyValue.getPrimitiveValue());
}
else
@@ -936,10 +932,8 @@ public String getStringProperty(String sourceName,
{
try
{
- if (propertyValue instanceof PrimitiveTypePropertyValue)
+ if (propertyValue instanceof PrimitiveTypePropertyValue primitiveTypePropertyValue)
{
- PrimitiveTypePropertyValue primitiveTypePropertyValue = (PrimitiveTypePropertyValue) propertyValue;
-
if (primitiveTypePropertyValue.getPrimitiveTypeCategory() == PrimitiveTypeCategory.OM_PRIMITIVE_TYPE_STRING)
{
if (primitiveTypePropertyValue.getPrimitiveValue() != null)
@@ -949,7 +943,7 @@ public String getStringProperty(String sourceName,
}
}
}
- catch (Throwable error)
+ catch (Exception error)
{
throwHelperLogicError(sourceName, methodName, thisMethodName);
}
@@ -986,10 +980,8 @@ public int getIntProperty(String sourceName,
{
try
{
- if (propertyValue instanceof PrimitiveTypePropertyValue)
+ if (propertyValue instanceof PrimitiveTypePropertyValue primitiveTypePropertyValue)
{
- PrimitiveTypePropertyValue primitiveTypePropertyValue = (PrimitiveTypePropertyValue) propertyValue;
-
if (primitiveTypePropertyValue.getPrimitiveTypeCategory() == PrimitiveTypeCategory.OM_PRIMITIVE_TYPE_INT)
{
if (primitiveTypePropertyValue.getPrimitiveValue() != null)
@@ -999,7 +991,7 @@ public int getIntProperty(String sourceName,
}
}
}
- catch (Throwable error)
+ catch (Exception error)
{
throwHelperLogicError(sourceName, methodName, thisMethodName);
}
@@ -1010,6 +1002,54 @@ public int getIntProperty(String sourceName,
}
+
+ /**
+ * Return the requested property or 0 if property is not found. If the property is not
+ * an long property then a logic exception is thrown.
+ *
+ * @param sourceName source of call
+ * @param propertyName name of requested property
+ * @param properties properties from the instance.
+ * @param methodName method of caller
+ * @return string property value or null
+ */
+ public long getLongProperty(String sourceName,
+ String propertyName,
+ ElementProperties properties,
+ String methodName)
+ {
+ final String thisMethodName = "getLongProperty";
+
+ if (properties != null)
+ {
+ PropertyValue propertyValue = properties.getPropertyValue(propertyName);
+
+ if (propertyValue != null)
+ {
+ try
+ {
+ if (propertyValue instanceof PrimitiveTypePropertyValue primitiveTypePropertyValue)
+ {
+ if (primitiveTypePropertyValue.getPrimitiveTypeCategory() == PrimitiveTypeCategory.OM_PRIMITIVE_TYPE_LONG)
+ {
+ if (primitiveTypePropertyValue.getPrimitiveValue() != null)
+ {
+ return Long.parseLong(primitiveTypePropertyValue.getPrimitiveValue().toString());
+ }
+ }
+ }
+ }
+ catch (Exception error)
+ {
+ throwHelperLogicError(sourceName, methodName, thisMethodName);
+ }
+ }
+ }
+
+ return 0;
+ }
+
+
/**
* Return the requested property or null if property is not found. If the property is not
* a date property then a logic exception is thrown.
@@ -1035,10 +1075,8 @@ public Date getDateProperty(String sourceName,
{
try
{
- if (propertyValue instanceof PrimitiveTypePropertyValue)
+ if (propertyValue instanceof PrimitiveTypePropertyValue primitiveTypePropertyValue)
{
- PrimitiveTypePropertyValue primitiveTypePropertyValue = (PrimitiveTypePropertyValue) propertyValue;
-
if (primitiveTypePropertyValue.getPrimitiveTypeCategory() == PrimitiveTypeCategory.OM_PRIMITIVE_TYPE_DATE)
{
if (primitiveTypePropertyValue.getPrimitiveValue() != null)
@@ -1050,7 +1088,7 @@ public Date getDateProperty(String sourceName,
}
}
}
- catch (Throwable error)
+ catch (Exception error)
{
throwHelperLogicError(sourceName, methodName, thisMethodName);
}
@@ -1088,10 +1126,8 @@ public boolean getBooleanProperty(String sourceName,
{
try
{
- if (propertyValue instanceof PrimitiveTypePropertyValue)
+ if (propertyValue instanceof PrimitiveTypePropertyValue primitiveTypePropertyValue)
{
- PrimitiveTypePropertyValue primitiveTypePropertyValue = (PrimitiveTypePropertyValue) propertyValue;
-
if (primitiveTypePropertyValue.getPrimitiveTypeCategory() == PrimitiveTypeCategory.OM_PRIMITIVE_TYPE_BOOLEAN)
{
if (primitiveTypePropertyValue.getPrimitiveValue() != null)
@@ -1101,7 +1137,7 @@ public boolean getBooleanProperty(String sourceName,
}
}
}
- catch (Throwable error)
+ catch (Exception error)
{
throwHelperLogicError(sourceName, methodName, thisMethodName);
}
@@ -1193,7 +1229,7 @@ private void throwHelperLogicError(String sourceName,
private void throwHelperLogicError(String sourceName,
String originatingMethodName,
String localMethodName,
- Throwable unexpectedException)
+ Exception unexpectedException)
{
throw new GAFRuntimeException(GAFErrorCode.HELPER_LOGIC_EXCEPTION.getMessageDefinition(sourceName,
localMethodName,
diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ConnectorBase.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ConnectorBase.java
index 09c6fcd7861..1be1737cb24 100644
--- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ConnectorBase.java
+++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/ConnectorBase.java
@@ -12,6 +12,7 @@
import org.odpi.openmetadata.frameworks.connectors.properties.beans.Connection;
import java.util.HashMap;
+import java.util.List;
import java.util.Map;
import java.util.UUID;
@@ -199,6 +200,34 @@ public synchronized void disconnect() throws ConnectorCheckedException
}
+ /**
+ * Disconnect all of the connectors in the supplied list. Any failures are ignored.
+ * This method is typically used by virtual connectors to disconnect their embedded connectors.
+ *
+ * @param activeConnectors connectors to disconnect.
+ */
+ protected void disconnectConnectors(List activeConnectors)
+ {
+ if (activeConnectors != null)
+ {
+ for (Connector embeddedConnector : activeConnectors)
+ {
+ if (embeddedConnector != null)
+ {
+ try
+ {
+ embeddedConnector.disconnect();
+ }
+ catch (Exception error)
+ {
+ // keep going
+ }
+ }
+ }
+ }
+ }
+
+
/**
* Return a flag indicating whether the connector is active. This means it has been started and not yet
* disconnected.
diff --git a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/ConnectionProperties.java b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/ConnectionProperties.java
index 8de1b68bbb7..61337a084fe 100644
--- a/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/ConnectionProperties.java
+++ b/open-metadata-implementation/frameworks/open-connector-framework/src/main/java/org/odpi/openmetadata/frameworks/connectors/properties/ConnectionProperties.java
@@ -108,6 +108,30 @@ public ConnectionProperties(ConnectionProperties templateConnection)
}
+ /**
+ * Copy/clone Constructor to return a copy of a connection object but with a replacement connector type.
+ *
+ * @param templateConnection template object to copy.
+ * @param connectorType connector type to replace in the connection
+ */
+ public ConnectionProperties(ConnectionProperties templateConnection,
+ ConnectorType connectorType)
+ {
+ super(templateConnection);
+
+ if (templateConnection == null)
+ {
+ this.connectionBean = new Connection();
+ }
+ else
+ {
+ this.connectionBean = new Connection(templateConnection.getConnectionBean());
+ }
+
+ this.connectionBean.setConnectorType(connectorType);
+ }
+
+
/**
* Return the bean with all the properties.
*
diff --git a/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/DiscoveryService.java b/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/DiscoveryService.java
index a587f2de636..91aea3aec4c 100644
--- a/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/DiscoveryService.java
+++ b/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/DiscoveryService.java
@@ -213,24 +213,7 @@ protected void handleUnexpectedException(String methodName,
@Override
public synchronized void disconnect() throws ConnectorCheckedException
{
+ super.disconnectConnectors(this.embeddedConnectors);
super.disconnect();
-
- if (this.embeddedConnectors != null)
- {
- for (Connector embeddedConnector : this.embeddedConnectors)
- {
- if (embeddedConnector != null)
- {
- try
- {
- embeddedConnector.disconnect();
- }
- catch (Exception error)
- {
- // keep going
- }
- }
- }
- }
}
}
diff --git a/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/DiscoveryServiceProvider.java b/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/DiscoveryServiceProvider.java
index 6aca15df7cb..db69c7868ed 100644
--- a/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/DiscoveryServiceProvider.java
+++ b/open-metadata-implementation/frameworks/open-discovery-framework/src/main/java/org/odpi/openmetadata/frameworks/discovery/DiscoveryServiceProvider.java
@@ -4,9 +4,84 @@
import org.odpi.openmetadata.frameworks.connectors.ConnectorProviderBase;
+import java.util.List;
+
/**
* DiscoveryServiceProvider implements the base class for the connector provider for a discovery service.
*/
public abstract class DiscoveryServiceProvider extends ConnectorProviderBase
{
+ /*
+ * The type name of the asset that this connector supports.
+ */
+ protected static final String supportedAssetTypeName = "OpenDiscoveryService";
+
+ /*
+ * Additional configuration to aid choreographing this service in a Governance Action Process.
+ */
+ protected List supportedRequestTypes = null;
+ protected List supportedRequestParameters = null;
+ protected List supportedRequestSourceNames = null;
+ protected List supportedTargetActionNames = null;
+ protected List supportedGuards = null;
+
+
+ /**
+ * The request types returned are those that affect the governance action service's behaviour. Other request types may be used
+ * to call the governance action service but they result in default behaviour.
+ *
+ * @return list of request types
+ */
+ public List supportedRequestTypes()
+ {
+ return supportedRequestTypes;
+ }
+
+
+ /**
+ * The request parameters returned are used by the governance action service to control its behaviour.
+ *
+ * @return list of parameter names used if the connector is provisioning
+ */
+ public List supportedRequestParameters()
+ {
+ return supportedRequestParameters;
+ }
+
+
+ /**
+ * The request source names returned are the request source names that affect the governance action service's behaviour. Other request
+ * source names may be used in a call the governance action service but they result in default behaviour.
+ *
+ * @return list of request sources with special meaning
+ */
+ public List supportedRequestSourceNames()
+ {
+ return supportedRequestSourceNames;
+ }
+
+
+ /**
+ * The action target names returned are those that affect the governance action service's behaviour. Other action target names may be used
+ * in a call the governance action service but they result in default behaviour.
+ *
+ * @return list of action target names with special meaning
+ */
+ public List supportedActionTargetNames()
+ {
+ return supportedTargetActionNames;
+ }
+
+
+ /**
+ * The guards describe the output assessment from the governance action service. The list returned is the complete list of
+ * guards to expect from the governance action service. They are used when defining governance action processes that choreograph
+ * the execution of governance action services using the guards to determine the path in the process to take.
+ *
+ * @return list of guards
+ */
+ public List supportedGuards()
+ {
+ return supportedGuards;
+ }
}
diff --git a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/connectors/IntegrationConnectorBase.java b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/connectors/IntegrationConnectorBase.java
index 260e38d388f..1c1be9057fc 100644
--- a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/connectors/IntegrationConnectorBase.java
+++ b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/connectors/IntegrationConnectorBase.java
@@ -129,24 +129,7 @@ public void engage() throws ConnectorCheckedException
@Override
public synchronized void disconnect() throws ConnectorCheckedException
{
+ super.disconnectConnectors(this.embeddedConnectors);
super.disconnect();
-
- if (this.embeddedConnectors != null)
- {
- for (Connector embeddedConnector : this.embeddedConnectors)
- {
- if (embeddedConnector != null)
- {
- try
- {
- embeddedConnector.disconnect();
- }
- catch (Exception error)
- {
- // keep going
- }
- }
- }
- }
}
}
diff --git a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/connectors/IntegrationConnectorProvider.java b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/connectors/IntegrationConnectorProvider.java
index ad46fac4064..be12a422a1c 100644
--- a/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/connectors/IntegrationConnectorProvider.java
+++ b/open-metadata-implementation/frameworks/open-integration-framework/src/main/java/org/odpi/openmetadata/frameworks/integration/connectors/IntegrationConnectorProvider.java
@@ -19,6 +19,10 @@ public class IntegrationConnectorProvider extends ConnectorProviderBase
private long refreshTimeInterval = 60L; // default to once an hour
private boolean usesBlockingCalls = false;
+ /*
+ * The type name of the asset that this connector supports.
+ */
+ protected static final String supportedAssetTypeName = "IntegrationConnector";
/*
* Descriptive information about the connector for the connector type and audit log.
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 49e8670c0e8..febc28f1940 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
@@ -414,7 +414,20 @@ public int getMaxPageSize()
public boolean isTypeOf(ElementHeader elementHeader,
String typeName)
{
- ElementType elementType = elementHeader.getType();
+ return isTypeOf(elementHeader.getType(), typeName);
+ }
+
+
+ /**
+ * Understand the type of element. It checks the type and super types.
+ *
+ * @param elementType element to validate
+ * @param typeName type to test
+ * @return boolean flag
+ */
+ public boolean isTypeOf(ElementType elementType,
+ String typeName)
+ {
if (elementType != null)
{
List elementTypeNames = new ArrayList<>();
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 212b69622a3..b8bcc4767aa 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
@@ -316,6 +316,30 @@ public List findRelationshipsBetweenMetadataElements(St
}
+ /**
+ * Retrieve the relationship using its unique identifier.
+ *
+ * @param relationshipGUID unique identifier for the relationship
+ * @param forLineage the retrieved element is for lineage processing so include archived elements
+ * @param forDuplicateProcessing the retrieved element is for duplicate processing so do not combine results from known duplicates.
+ * @param effectiveTime only return the element if it is effective at this time. Null means anytime. Use "new Date()" for now.
+ *
+ * @return relationship properties
+ * @throws InvalidParameterException the unique identifier is null or not known.
+ * @throws UserNotAuthorizedException the governance action service is not able to access the element
+ * @throws PropertyServerException there is a problem accessing the metadata store
+ */
+ public RelatedMetadataElements getRelationshipByGUID(String relationshipGUID,
+ boolean forLineage,
+ boolean forDuplicateProcessing,
+ Date effectiveTime) throws InvalidParameterException,
+ UserNotAuthorizedException,
+ PropertyServerException
+ {
+ return openMetadataStore.getRelationshipByGUID(userId, relationshipGUID, forLineage, forDuplicateProcessing, effectiveTime);
+ }
+
+
/**
* Create a new metadata element in the metadata store. The type name comes from the open metadata types.
* The selected type also controls the names and types of the properties that are allowed.
diff --git a/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/properties/GovernanceEngineStatus.java b/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/properties/GovernanceEngineStatus.java
index 59a27c5373a..ea9c27de1b6 100644
--- a/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/properties/GovernanceEngineStatus.java
+++ b/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/properties/GovernanceEngineStatus.java
@@ -18,18 +18,37 @@
@JsonIgnoreProperties(ignoreUnknown=true)
public enum GovernanceEngineStatus
{
+ /**
+ * The governance engine is assigned to the engine host server but has not yet been configured.
+ */
ASSIGNED (0, "Assigned", "The governance engine is assigned to the engine host server but has not yet been configured."),
+
+ /**
+ * The governance engine is retrieving its configuration from the metadata server.
+ */
CONFIGURING (1, "Configuring", "The governance engine is retrieving its configuration from the metadata server."),
+
+ /**
+ * The governance engine is operational and able to service all defined governance requests on demand.
+ */
RUNNING (2, "Running", "The governance engine is operational and able to service all defined governance requests on demand."),
+
+ /**
+ * The governance engine is unable to run successfully due to an error in its configuration.
+ */
FAILED (3, "Failed", "The governance engine is unable to run successfully due to an error in its configuration."),
+
+ /**
+ * The governance engine has been disabled. It is waiting to be enabled before it can service any more governance requests.
+ */
DISABLED (4, "Disabled", "The governance engine has been disabled. It is waiting to be enabled before " +
"it can service any more governance requests.");
private static final long serialVersionUID = 1L;
- private int ordinal;
- private String statusName;
- private String statusDescription;
+ private final int ordinal;
+ private final String statusName;
+ private final String statusDescription;
/**
diff --git a/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/properties/GovernanceEngineSummary.java b/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/properties/GovernanceEngineSummary.java
index fe9668870fc..f6087f18dab 100644
--- a/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/properties/GovernanceEngineSummary.java
+++ b/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/properties/GovernanceEngineSummary.java
@@ -7,7 +7,6 @@
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
-import java.io.Serializable;
import java.util.List;
import java.util.Objects;
@@ -20,10 +19,8 @@
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
-public class GovernanceEngineSummary implements Serializable
+public class GovernanceEngineSummary
{
- private static final long serialVersionUID = 1L;
-
private String governanceEngineName = null;
private String governanceEngineTypeName = null;
private String governanceEngineService = null;
diff --git a/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/rest/GovernanceEngineSummariesResponse.java b/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/rest/GovernanceEngineSummariesResponse.java
index e9df3006448..6628b6c30a9 100644
--- a/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/rest/GovernanceEngineSummariesResponse.java
+++ b/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/rest/GovernanceEngineSummariesResponse.java
@@ -14,16 +14,14 @@
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
/**
* GovernanceEngineSummariesResponse provides a container for transporting the status of a collection of governance engines.
*/
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
public class GovernanceEngineSummariesResponse extends FFDCResponseBase
{
- private static final long serialVersionUID = 1L;
-
private List governanceEngineSummaries = null;
diff --git a/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/rest/GovernanceEngineSummaryResponse.java b/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/rest/GovernanceEngineSummaryResponse.java
index 37f409836cf..0b0d38f1f72 100644
--- a/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/rest/GovernanceEngineSummaryResponse.java
+++ b/open-metadata-implementation/governance-servers/engine-host-services/engine-host-services-api/src/main/java/org/odpi/openmetadata/governanceservers/enginehostservices/rest/GovernanceEngineSummaryResponse.java
@@ -13,17 +13,15 @@
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
-@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
-@JsonInclude(JsonInclude.Include.NON_NULL)
-@JsonIgnoreProperties(ignoreUnknown=true)
/**
* GovernanceEngineSummaryResponse provides a container for transporting the status of each of the governance
* engines.
*/
+@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
+@JsonInclude(JsonInclude.Include.NON_NULL)
+@JsonIgnoreProperties(ignoreUnknown=true)
public class GovernanceEngineSummaryResponse extends FFDCResponseBase
{
- private static final long serialVersionUID = 1L;
-
private GovernanceEngineSummary governanceEngineSummary = null;
diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/auditlog/OMRSAuditLogRecordSeverity.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/auditlog/OMRSAuditLogRecordSeverity.java
index f0c62137898..70130fde0aa 100644
--- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/auditlog/OMRSAuditLogRecordSeverity.java
+++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/auditlog/OMRSAuditLogRecordSeverity.java
@@ -91,7 +91,13 @@ public enum OMRSAuditLogRecordSeverity implements AuditLogRecordSeverity
* PerfMon - This log record contains performance monitoring timing information for specific types of processing. It is not normally logged to any destination but can be added when needed.
*/
PERFMON (14, "PerfMon", "This log record contains performance monitoring timing information for " +
- "specific types of processing. It is not normally logged to any destination but can be added when needed.")
+ "specific types of processing. It is not normally logged to any destination but can be added when needed."),
+
+
+ /**
+ * Activity - This log record contains user activity information such as the requests being made and the metadata being accessed.
+ */
+ ACTIVITY (15, "Activity", "This log record contains user activity information such as the requests being made and the metadata being accessed.")
;
diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/omrstopic/OMRSTopicConnector.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/omrstopic/OMRSTopicConnector.java
index 31d2a902ffe..f1d944c23cd 100644
--- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/omrstopic/OMRSTopicConnector.java
+++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/omrstopic/OMRSTopicConnector.java
@@ -624,15 +624,11 @@ private void processOMRSEvent(OMRSEventV1 event,
@Override
public void disconnect() throws ConnectorCheckedException
{
+ super.disconnectConnectors(this.embeddedConnectors);
super.disconnect();
final String actionDescription = "Disconnect OMRS Topic Connector";
- for (OpenMetadataTopicConnector eventBusConnector : eventBusConnectors)
- {
- eventBusConnector.disconnect();
- }
-
if ((auditLog != null) && (! unknownTopicName.equals(topicName)))
{
auditLog.logMessage(actionDescription,
diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/openmetadatatopic/OpenMetadataTopicConsumerBase.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/openmetadatatopic/OpenMetadataTopicConsumerBase.java
index dad7d0f0956..afdbfb9c575 100644
--- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/openmetadatatopic/OpenMetadataTopicConsumerBase.java
+++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/openmetadatatopic/OpenMetadataTopicConsumerBase.java
@@ -22,6 +22,7 @@
public class OpenMetadataTopicConsumerBase extends ConnectorBase implements VirtualConnectorExtension,
AuditLoggingComponent
{
+ protected List embeddedConnectors = null;
protected List eventBusConnectors = new ArrayList<>();
protected String connectionName = "";
protected AuditLog auditLog = null;
@@ -37,6 +38,8 @@ public class OpenMetadataTopicConsumerBase extends ConnectorBase implements Virt
@Override
public void initializeEmbeddedConnectors(List embeddedConnectors)
{
+ this.embeddedConnectors = embeddedConnectors;
+
if (embeddedConnectors != null)
{
for (Connector embeddedConnector : embeddedConnectors)
@@ -154,14 +157,7 @@ public void start() throws ConnectorCheckedException
@Override
public void disconnect() throws ConnectorCheckedException
{
+ super.disconnectConnectors(this.embeddedConnectors);
super.disconnect();
-
- /*
- * Each of the event bus connectors need to be disconnected, so they stop receiving inbound events.
- */
- for (OpenMetadataTopicConnector eventBusConnector : eventBusConnectors)
- {
- eventBusConnector.start();
- }
}
}
diff --git a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/stores/metadatacollectionstore/OMRSMetadataCollection.java b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/stores/metadatacollectionstore/OMRSMetadataCollection.java
index d168f19ed56..a2a22916c84 100644
--- a/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/stores/metadatacollectionstore/OMRSMetadataCollection.java
+++ b/open-metadata-implementation/repository-services/repository-services-apis/src/main/java/org/odpi/openmetadata/repositoryservices/connectors/stores/metadatacollectionstore/OMRSMetadataCollection.java
@@ -65,7 +65,6 @@
* OMRSMetadataInstanceStore is the common interface for working with the contents of a metadata repository.
* Within a metadata collection are the type definitions (TypeDefs) and metadata instances (Entities and
* Relationships).
- *
* The methods on OMRSMetadataInstanceStore are in the following major groups:
*
*
@@ -280,7 +279,6 @@ protected void basicRequestValidation(String userId,
* Returns the identifier of the metadata repository. This is the identifier used to register the
* metadata repository with the metadata repository cohort. It is also the identifier used to
* identify the home repository of a metadata instance.
- *
* This request has been deprecated because it does not work in a server without security (no userId)
* and to open up a secured server to allow requests without userIds is not a good idea.
*
@@ -2810,7 +2808,6 @@ public void deleteEntityReferenceCopy(String userId,
* remove reference copies from the local cohort, repositories that have left the cohort,
* or entities that have come from open metadata archives. It is also an opportunity to remove
* relationships attached to the entity.
- *
* This method is called when a remote repository calls the variant of purgeEntity that
* passes the EntityDetail object. This is typically used if purge is called without a previous soft-delete.
* However, it may also be used to purge after a soft-delete.
@@ -3209,7 +3206,6 @@ public void deleteRelationshipReferenceCopy(String userId,
* This method is called when a remote repository calls the variant of purgeRelationship that
* passes the relationship object. This is typically used if purge is called without a previous soft-delete.
* However, it may also be used to purge after a soft-delete.
- *
* Remove the reference copy of the relationship from the local repository. This method can be used to
* remove reference copies from the local cohort, repositories that have left the cohort,
* or relationships that have come from open metadata archives.
diff --git a/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/metadatahighway/OMRSCohortManager.java b/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/metadatahighway/OMRSCohortManager.java
index 3e9c50e6918..71e8a24ae8d 100644
--- a/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/metadatahighway/OMRSCohortManager.java
+++ b/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/metadatahighway/OMRSCohortManager.java
@@ -296,7 +296,6 @@ public void initialize(String cohortName,
/**
* Set up a new security verifier (the metadata collection runs with a default verifier until this
* method is called).
- *
* The security verifier provides authorization checks for access and maintenance
* changes to open metadata. Authorization checks are enabled through the
* OpenMetadataServerSecurityConnector.
diff --git a/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/metadatahighway/cohortregistry/OMRSCohortRegistry.java b/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/metadatahighway/cohortregistry/OMRSCohortRegistry.java
index 7256ad0da16..01e858537f2 100644
--- a/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/metadatahighway/cohortregistry/OMRSCohortRegistry.java
+++ b/open-metadata-implementation/repository-services/repository-services-implementation/src/main/java/org/odpi/openmetadata/repositoryservices/metadatahighway/cohortregistry/OMRSCohortRegistry.java
@@ -250,7 +250,6 @@ public void initialize(String cohortName,
* A new server needs to register the metadataCollectionId for its metadata repository with the other servers in the
* open metadata repository. It only needs to do this once and uses a timestamp to record that the registration
* event has been sent.
- *
* If the server has already registered in the past, it sends a registration request.
*/
public synchronized void connectToCohort()
diff --git a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java
index b1df4d44e14..bbc89f829ce 100644
--- a/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java
+++ b/open-metadata-resources/open-metadata-archives/open-metadata-types/src/main/java/org/odpi/openmetadata/opentypes/OpenMetadataTypesArchive.java
@@ -7,6 +7,7 @@
import org.odpi.openmetadata.repositoryservices.archiveutilities.OMRSArchiveHelper;
import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchive;
import org.odpi.openmetadata.repositoryservices.connectors.stores.archivestore.properties.OpenMetadataArchiveType;
+import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.EntityDef;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefAttribute;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.TypeDefPatch;
import org.odpi.openmetadata.repositoryservices.ffdc.OMRSErrorCode;
@@ -159,8 +160,10 @@ public void getOriginalTypes()
update0010Base();
update0017ExternalIdentifiers();
update0035Hosts();
+ update0112People();
update0210DataStores();
update0212APIs();
+ update0224Databases();
update0215SoftwareComponents();
update0223Events();
}
@@ -333,6 +336,57 @@ private TypeDefPatch updateHostClusterMemberRelationship()
}
+ /*
+ * -------------------------------------------------------------------------------------------------------
+ */
+
+ private void update0112People()
+ {
+ this.archiveBuilder.addTypeDefPatch(updatePerson());
+ }
+
+
+ private TypeDefPatch updatePerson()
+ {
+ /*
+ * Create the Patch
+ */
+ final String typeName = "Person";
+
+ TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(typeName);
+
+ typeDefPatch.setUpdatedBy(originatorName);
+ typeDefPatch.setUpdateTime(creationDate);
+
+ /*
+ * Build the attributes
+ */
+ List properties = new ArrayList<>();
+ TypeDefAttribute property;
+
+ final String attribute1Name = "residentCountry";
+ final String attribute1Description = "Country that is the person's primary residence.";
+ final String attribute1DescriptionGUID = null;
+ final String attribute2Name = "timeZone";
+ final String attribute2Description = "Principle time zone where this person is located.";
+ final String attribute2DescriptionGUID = null;
+
+ property = archiveHelper.getStringTypeDefAttribute(attribute1Name,
+ attribute1Description,
+ attribute1DescriptionGUID);
+ properties.add(property);
+ property = archiveHelper.getStringTypeDefAttribute(attribute2Name,
+ attribute2Description,
+ attribute2DescriptionGUID);
+ properties.add(property);
+
+ typeDefPatch.setPropertyDefinitions(properties);
+
+ return typeDefPatch;
+ }
+
+
+
/*
* -------------------------------------------------------------------------------------------------------
*/
@@ -376,7 +430,6 @@ private TypeDefPatch updateDataStore()
}
-
/*
* -------------------------------------------------------------------------------------------------------
*/
@@ -507,6 +560,36 @@ private TypeDefPatch updateDataFeed()
}
+
+ /*
+ * -------------------------------------------------------------------------------------------------------
+ */
+
+ private void update0224Databases()
+ {
+ this.archiveBuilder.addEntityDef(addRelationalDatabaseEntity());
+ }
+
+
+
+ private EntityDef addRelationalDatabaseEntity()
+ {
+ final String guid = "6a28e242-4eca-4664-81cb-e2096d769568";
+
+ final String name = "RelationalDatabase";
+ final String description = "A database that follows the relational schema (tables and columns) and can be accessed through Java Database Connectivity (JDBC).";
+ final String descriptionGUID = null;
+
+ final String superTypeName = "Database";
+
+ return archiveHelper.getDefaultEntityDef(guid,
+ name,
+ this.archiveBuilder.getEntityDef(superTypeName),
+ description,
+ descriptionGUID);
+ }
+
+
/*
* -------------------------------------------------------------------------------------------------------
*/
diff --git a/open-metadata-resources/open-metadata-deployment/docker/egeria/README.md b/open-metadata-resources/open-metadata-deployment/docker/egeria/README.md
index 9589314e212..8a37d3f615d 100644
--- a/open-metadata-resources/open-metadata-deployment/docker/egeria/README.md
+++ b/open-metadata-resources/open-metadata-deployment/docker/egeria/README.md
@@ -41,7 +41,7 @@ To use this
### Self-build dockerfile
-This dockerfile will also build egeria itself - so no seperate steps are needed. Simply run the dockerfile directly and it will extract egeria source & build it within the container.
+This dockerfile will also build egeria itself - so no separate steps are needed. Simply run the dockerfile directly and it will extract egeria source & build it within the container.
Run `docker build -t egeria:myversion -f Dockerfile.selfbuild .`
diff --git a/settings.gradle b/settings.gradle
index 1da7c98383e..164e50cbf9b 100644
--- a/settings.gradle
+++ b/settings.gradle
@@ -61,7 +61,6 @@ include(':open-metadata-implementation:adapters:open-connectors:integration-conn
include(':open-metadata-implementation:adapters:open-connectors:integration-connectors:openapi-integration-connector')
include(':open-metadata-implementation:adapters:open-connectors:integration-connectors:openlineage-integration-connectors')
include(':open-metadata-implementation:adapters:open-connectors:integration-connectors:elasticsearch-integration-connector')
-include(':open-metadata-test:open-metadata-fvt:view-services-fvt:glossary-author-fvt')
include(':open-metadata-implementation:adapters:open-connectors:governance-daemon-connectors:open-lineage-connectors:open-lineage-janus-connector')
include(':open-metadata-implementation:adapters:open-connectors:discovery-service-connectors')
include(':open-metadata-implementation:adapters:open-connectors:dynamic-archiver-connectors')
@@ -335,6 +334,7 @@ include(':open-metadata-conformance-suite:open-metadata-conformance-suite-spring
//include(':open-metadata-distribution:open-metadata-packages:open-metadata-adapter-package')
//include(':open-metadata-distribution:open-metadata-packages')
include(':open-metadata-distribution:open-metadata-assemblies')
+include(':open-metadata-distribution:omag-server-platform')
include(':open-metadata-resources:open-metadata-archives:design-model-archives:design-model-archive-base')
include(':open-metadata-resources:open-metadata-archives:design-model-archives:glossary-canonical-model')
include(':open-metadata-resources:open-metadata-archives:open-connector-archives')
@@ -369,6 +369,7 @@ include(':open-metadata-test:open-metadata-fvt:access-services-fvt:governance-en
include(':open-metadata-test:open-metadata-fvt:access-services-fvt:governance-program-fvt')
include(':open-metadata-test:open-metadata-fvt:access-services-fvt:stewardship-action-fvt')
include(':open-metadata-test:open-metadata-fvt:access-services-fvt:subject-area-fvt')
+include(':open-metadata-test:open-metadata-fvt:view-services-fvt:glossary-author-fvt')
include(':open-metadata-test:open-metadata-fvt:fvt-utilities')
//if (!startParameter.projectProperties.hasProperty("skipOpenTypesFVT")) {
// include(':open-metadata-test:open-metadata-fvt:open-types-fvt:open-types-test-generator')